1
0
mirror of https://github.com/eleith/emailjs.git synced 2024-06-30 18:30:58 +00:00

test: nits

This commit is contained in:
Zack Schuster 2020-05-27 08:59:53 -07:00
parent 95d94c2c65
commit 5b4f95a754
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import test from 'ava';
import { simpleParser } from 'mailparser';
import { SMTPServer } from 'smtp-server';
import { Client, Message, DEFAULT_TIMEOUT } from '../email';
import { DEFAULT_TIMEOUT, Client, Message } from '../email';
type UnPromisify<T> = T extends Promise<infer U> ? U : T;
@ -13,7 +13,7 @@ const client = new Client({
password: 'honey',
ssl: true,
});
const server = new SMTPServer({ secure: true, authMethods: ['LOGIN'] });
const server = new SMTPServer({ secure: true });
const send = (
message: Message,
@ -34,7 +34,7 @@ const send = (
test.before.cb((t) => {
server.listen(port, function () {
server.onAuth = function (auth, _session, callback) {
if (auth.username == 'pooh' && auth.password == 'honey') {
if (auth.username === 'pooh' && auth.password === 'honey') {
callback(null, { user: 'pooh' });
} else {
return callback(new Error('invalid user / pass'));

View File

@ -14,7 +14,7 @@ const client = new Client({
password: 'honey',
ssl: true,
});
const server = new SMTPServer({ secure: true, authMethods: ['LOGIN'] });
const server = new SMTPServer({ secure: true });
type UnPromisify<T> = T extends Promise<infer U> ? U : T;
const send = (