Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
fix: fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed Dec 5, 2019
1 parent b743c01 commit 3eb752e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 97 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "forward-email",
"description": "ForwardEmail is the best free email forwarding for custom domains at http://forwardemail.net",
"version": "3.0.1",
"version": "3.1.0",
"author": "Nick Baugh <[email protected]> (http://niftylettuce.com/)",
"ava": {
"serial": true,
Expand Down
108 changes: 12 additions & 96 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,7 @@ if (!isCI)
text: 'test text',
html: '<strong>test html</strong>',
attachments: [],
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
return new Promise(resolve => {
connection.once('end', resolve);
Expand All @@ -199,14 +192,7 @@ if (!isCI)
text: 'test text',
html: '<strong>test html</strong>',
attachments: [],
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
return new Promise(resolve => {
connection.once('end', resolve);
Expand Down Expand Up @@ -234,14 +220,7 @@ if (!isCI)
text: 'test text',
html: '<strong>test html</strong>',
attachments: [],
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
return new Promise(resolve => {
connection.once('end', resolve);
Expand Down Expand Up @@ -275,14 +254,7 @@ if (!isCI)
text: 'test text',
html: '<strong>test html</strong>',
attachments: [],
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
return new Promise(resolve => {
connection.once('end', resolve);
Expand All @@ -309,14 +281,7 @@ if (!isCI)
text: 'test text',
html: '<strong>test html</strong>',
attachments: [],
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
return new Promise(resolve => {
connection.once('end', resolve);
Expand Down Expand Up @@ -346,14 +311,7 @@ if (!isCI)
text: 'test text',
html: '<strong>test html</strong>',
attachments: [],
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
/*
t.deepEqual(info.envelope, ['[email protected]']);
Expand Down Expand Up @@ -383,14 +341,7 @@ if (!isCI)
text: 'test text',
html: '<strong>test html</strong>',
attachments: [],
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
/*
t.deepEqual(info.envelope, ['[email protected]']);
Expand Down Expand Up @@ -421,14 +372,7 @@ if (!isCI)
text: 'test text',
html: '<strong>test html</strong>',
attachments: [],
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
/*
t.deepEqual(info.envelope, [
Expand Down Expand Up @@ -464,14 +408,7 @@ if (!isCI)
text: 'test text',
html: '<strong>test html</strong>',
attachments: [],
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
return new Promise(resolve => {
connection.once('end', resolve);
Expand Down Expand Up @@ -499,14 +436,7 @@ if (!isCI && shell.which('spamassassin') && shell.which('spamc'))
// <https://github.com/humantech/node-spamd/blob/master/test/spamd-tests.js#L13-L14>
subject: 'Viagra, Cialis, Vicodin: buy medicines without prescription!',
html: 'Cheap prices on viagra, cialis, vicodin! FPA approved!',
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
return new Promise(resolve => {
connection.once('end', resolve);
Expand Down Expand Up @@ -605,14 +535,7 @@ if (!isCI)
subject: 'test',
text: 'test text',
html: '<strong>test html</strong>',
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
return new Promise(resolve => {
connection.once('end', resolve);
Expand Down Expand Up @@ -726,14 +649,7 @@ if (!isCI)
subject: 'test',
text: 'test text',
html: '<strong>test html</strong>',
dkim: {
domainName: 'forwardemail.net',
keySelector: 'default',
privateKey: fs.readFileSync(
path.join(__dirname, '..', 'dkim-private.key'),
'utf8'
)
}
dkim: t.context.forwardEmail.config.dkim
});
const connection = new Client({ port, tls });
connection.once('end', resolve);
Expand Down

0 comments on commit 3eb752e

Please sign in to comment.