-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d508f79
commit 52f047a
Showing
6 changed files
with
42 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,3 +94,4 @@ samples/todo | |
|
||
|
||
.nx/cache | ||
sonar-project.properties |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const nxPreset = require('@nx/jest/preset').default; | ||
|
||
module.exports = { ...nxPreset }; | ||
module.exports = { ...nxPreset, coverageReporters: [...nxPreset.coverageReporters, 'lcov', 'cobertura'] }; |
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 |
---|---|---|
|
@@ -55,7 +55,7 @@ describe('MailerService', () => { | |
const expected = { ...input, from: '[email protected]' }; | ||
|
||
service.sendPlainMail(input); | ||
expect(transporter.sendMail).toBeCalledWith(expected); | ||
expect(transporter.sendMail).toHaveBeenCalledWith(expected); | ||
}); | ||
|
||
it('should send a plain text email using the provided transporter providing all params', () => { | ||
|
@@ -68,7 +68,7 @@ describe('MailerService', () => { | |
const expected = { ...input, from: '[email protected]' }; | ||
|
||
service.sendPlainMail(input.to, input.subject, input.html); | ||
expect(transporter.sendMail).toBeCalledWith(expected); | ||
expect(transporter.sendMail).toHaveBeenCalledWith(expected); | ||
}); | ||
|
||
it('should send email from a handlebars template by using the provided transporter providing emailOptions object', () => { | ||
|
@@ -99,7 +99,7 @@ describe('MailerService', () => { | |
}; | ||
|
||
service.sendTemplateMail(input, 'test', { title: 'my title' }); | ||
expect(transporter.sendMail).toBeCalledWith(expected); | ||
expect(transporter.sendMail).toHaveBeenCalledWith(expected); | ||
}); | ||
|
||
it('should register a template and should be ready to use', () => { | ||
|
@@ -116,7 +116,7 @@ describe('MailerService', () => { | |
|
||
service.addTemplate('my-view', `My view`); | ||
service.sendTemplateMail(input, 'my-view', {}); | ||
expect(transporter.sendMail).toBeCalledWith(expected); | ||
expect(transporter.sendMail).toHaveBeenCalledWith(expected); | ||
}); | ||
|
||
it('should register a partial and should be ready to use', () => { | ||
|
@@ -134,7 +134,7 @@ describe('MailerService', () => { | |
service.addTemplate('my-view', `{{#> my-partial }}My view{{/my-partial}}`); | ||
service.registerPartial('my-partial', `this is my partial: {{> @partial-block }}`); | ||
service.sendTemplateMail(input, 'my-view', {}); | ||
expect(transporter.sendMail).toBeCalledWith(expected); | ||
expect(transporter.sendMail).toHaveBeenCalledWith(expected); | ||
}); | ||
|
||
it('should register a helper and should be ready to use', () => { | ||
|
@@ -154,6 +154,6 @@ describe('MailerService', () => { | |
}); | ||
service.addTemplate('my-view', `{{#bold}}My view{{/bold}}`); | ||
service.sendTemplateMail(input, 'my-view', {}); | ||
expect(transporter.sendMail).toBeCalledWith(expected); | ||
expect(transporter.sendMail).toHaveBeenCalledWith(expected); | ||
}); | ||
}); |
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