-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* load npm version of punycode (specify / after require) - dep(mocha): remove dev dep (installed by npx) - dep(punycode): bump 2.3.0 to 2.3.1 * switch to haraka shared workflow * ci: remove coveralls workflow (dupe) * exclude .gitmodules from npm publish * test: use strict assertions
- Loading branch information
Showing
7 changed files
with
29 additions
and
72 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 was deleted.
Oops, something went wrong.
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,3 +12,4 @@ node_modules | |
.lock-wscript | ||
package-lock.json | ||
.eslintrc.yaml | ||
.gitmodules |
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
'use strict'; | ||
|
||
const assert = require('assert'); | ||
const assert = require('node:assert/strict'); | ||
|
||
const Address = require('../index').Address; | ||
|
||
|
@@ -119,29 +119,25 @@ describe('isNull', function () { | |
}) | ||
|
||
describe('format()', function () { | ||
it('works', function (done) { | ||
it('works', function () { | ||
const addr = new Address('<[email protected]>'); | ||
assert.equal(addr.user, 'matt'); | ||
assert.equal(addr.host, 'example.com'); | ||
assert.equal(addr.format(), '<[email protected]>'); | ||
done(); | ||
}) | ||
|
||
it('lower cases hostnames', function (done) { | ||
it('lower cases hostnames', function () { | ||
const addr = new Address('<[email protected]>'); | ||
assert.equal(addr.host, 'example.com'); | ||
done(); | ||
}) | ||
|
||
it('no latin escaping', function (done) { | ||
it('no latin escaping', function () { | ||
const addr = new Address('<přílišžluťoučkýkůň@přílišžluťoučkýkůň.cz>'); | ||
assert.equal(addr.format(), '<přílišžluťoučkýkůň@přílišžluťoučkýkůň.cz>'); | ||
done(); | ||
}) | ||
|
||
it('spaces inside a quoted string', function (done) { | ||
it('spaces inside a quoted string', function () { | ||
const addr = new Address('<"pří lišžlu ťoučkýkůň"@přílišžluťoučkýkůň.cz>'); | ||
assert.equal(addr.format(), '<"pří lišžlu ťoučkýkůň"@přílišžluťoučkýkůň.cz>'); | ||
done(); | ||
}) | ||
}) |