-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: solve some chore problems, make the code prettier
- Loading branch information
1 parent
8f606e3
commit 25e7f52
Showing
4 changed files
with
13 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,11 @@ describe('submitContactInfo', () => { | |
}) | ||
|
||
test('should return success result on repository success', async () => { | ||
const subject = 'Data Question' | ||
const fromEmail = '[email protected]' | ||
|
||
const contactDTO: ContactDTO = { | ||
targetId: 1, | ||
subject: subject, | ||
subject: 'Data Question', | ||
body: 'Please help me understand your data. Thank you!', | ||
fromEmail: fromEmail | ||
fromEmail: '[email protected]' | ||
} | ||
|
||
let contactInfo | ||
|
@@ -29,7 +26,7 @@ describe('submitContactInfo', () => { | |
throw new Error('Contact info should be submitted') | ||
} finally { | ||
expect(contactInfo).toBeDefined() | ||
expect(contactInfo[0].fromEmail).toEqual(fromEmail) | ||
expect(contactInfo[0].fromEmail).toEqual('[email protected]') | ||
expect(contactInfo[0].subject).toEqual(expect.any(String)) | ||
expect(contactInfo[0].body).toEqual(expect.any(String)) | ||
expect(contactInfo[0].toEmail).toEqual(expect.any(String)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import { WriteError, Contact, ContactDTO } from '../../../src' | |
import { SubmitContactInfo } from '../../../src/contactInfo/domain/useCases/SubmitContactInfo' | ||
import { IContactRepository } from '../../../src/contactInfo/domain/repositories/IContactRepository' | ||
|
||
describe('execute', () => { | ||
describe('execute submit information to contacts', () => { | ||
test('should return a ContactDTO when repository call is successful', async () => { | ||
const fromEmail = '[email protected]' | ||
|
||
|