Skip to content

Commit 8f606e3

Browse files
committed
fix: fix test problem
1 parent 8728186 commit 8f606e3

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

test/functional/contact/SubmitContactInfo.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ describe('submitContactInfo', () => {
2525
let contactInfo
2626
try {
2727
contactInfo = await submitContactInfo.execute(contactDTO)
28-
console.log('contactInfo:', contactInfo)
2928
} catch (error) {
3029
throw new Error('Contact info should be submitted')
3130
} finally {

test/integration/contact/ContactRepository.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ describe('submitContactInfo', () => {
3333
console.error('Error during submission:', error.message, error.response?.data)
3434
throw error
3535
}
36+
})
3637

37-
test('should return error if the target id is unexisted', async () => {
38-
const invalidContactDTO: ContactDTO = {
39-
targetId: 0,
40-
subject: '',
41-
body: '',
42-
fromEmail: ''
43-
}
44-
const expectedError = new WriteError(`[400] Feedback target object not found`)
45-
await expect(sut.submitContactInfo(invalidContactDTO)).rejects.toThrow(expectedError)
46-
})
38+
test('should return error if the target id is unexisted', async () => {
39+
const invalidContactDTO: ContactDTO = {
40+
targetId: 0,
41+
subject: '',
42+
body: '',
43+
fromEmail: ''
44+
}
45+
const expectedError = new WriteError(`[400] Feedback target object not found`)
46+
await expect(sut.submitContactInfo(invalidContactDTO)).rejects.toThrow(expectedError)
4747
})
4848
})

0 commit comments

Comments
 (0)