Skip to content

Commit

Permalink
fix: fixes a bad call to smtp options and broken unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juandav committed Jul 21, 2022
1 parent eeba9a0 commit 1ef2d80
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/mailer.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Test, TestingModule } from '@nestjs/testing';
import MailMessage = require('nodemailer/lib/mailer/mail-message');
import SMTPTransport = require('nodemailer/lib/smtp-transport');
import * as SMTPTransport from 'nodemailer/lib/smtp-transport';
import * as nodemailerMock from 'nodemailer-mock';

import MailMessage from 'nodemailer/lib/mailer/mail-message';

import {
MAILER_OPTIONS,
MAILER_TRANSPORT_FACTORY,
Expand Down
2 changes: 1 addition & 1 deletion lib/mailer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class MailerService {
}
}

addTransporter(transporterName: string, config: string | smtpTransport.SMTPTransport | smtpTransport.SMTPTransport.Options): string {
addTransporter(transporterName: string, config: string | smtpTransport | smtpTransport.Options): string {
this.transporters.set(
transporterName,
this.transportFactory.createTransport(config),
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"allowSyntheticDefaultImports": true,
"declaration": true,
"noImplicitAny": false,
"noUnusedLocals": false,
Expand Down

0 comments on commit 1ef2d80

Please sign in to comment.