Skip to content

Commit 9144521

Browse files
committed
add test
1 parent f381a85 commit 9144521

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/link-check.test.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,18 @@ describe('link-check', function () {
268268
});
269269
});
270270

271+
it('should handle valid mailto with multiple recipients', function (done) {
272+
linkCheck(
273+
'mailto:[email protected],[email protected]?subject=Test',
274+
function (err, result) {
275+
expect(err).to.be(null);
276+
expect(result.link).to.be('mailto:[email protected],[email protected]?subject=Test');
277+
expect(result.status).to.be('alive');
278+
done();
279+
}
280+
);
281+
});
282+
271283
it('should handle valid mailto with encoded characters in address', function (done) {
272284
linkCheck('mailto:foo%[email protected]', function (err, result) {
273285
expect(err).to.be(null);
@@ -304,6 +316,18 @@ describe('link-check', function () {
304316
});
305317
});
306318

319+
it('should handle invalid mailto with multiple recipients', function (done) {
320+
linkCheck(
321+
'mailto:foo@@bar@@baz,[email protected]?subject=Test',
322+
function (err, result) {
323+
expect(err).to.be(null);
324+
expect(result.link).to.be('mailto:foo@@bar@@baz,[email protected]?subject=Test');
325+
expect(result.status).to.be('dead');
326+
done();
327+
}
328+
);
329+
});
330+
307331
it('should handle file protocol', function(done) {
308332
linkCheck('fixtures/file.md', { baseUrl: 'file://' + __dirname }, function(err, result) {
309333
expect(err).to.be(null);

0 commit comments

Comments
 (0)