From 1bd2bf1ae3e78ee2814a8c30991d1d441ff4ddef Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Wed, 17 Apr 2019 20:49:47 +0900 Subject: Support blacklist with port --- test/shared/blacklists.test.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/shared/blacklists.test.js b/test/shared/blacklists.test.js index 87e89c5..289ea0f 100644 --- a/test/shared/blacklists.test.js +++ b/test/shared/blacklists.test.js @@ -39,4 +39,11 @@ describe("shared/blacklist", () => { expect(includes(blacklist, 'https://github.com/abcdef')).to.be.true; expect(includes(blacklist, 'https://gist.github.com/abc')).to.be.false; }) + + it('matches address and port', () => { + let blacklist = ['127.0.0.1:8888']; + + expect(includes(blacklist, 'http://127.0.0.1:8888/')).to.be.true; + expect(includes(blacklist, 'http://127.0.0.1:8888/hello')).to.be.true; + }) }); -- cgit v1.2.3