From 30a84fbbb4e930778e35cb4ab0b96903bc9257e9 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Tue, 1 Oct 2019 18:34:47 +0100 Subject: [PATCH] fix: make invalid url actually invalid I'm using one of those ISPs that 'helpfully' directs you to a search page if the URL you are accessing does not have a DNS match. The URL used in the test was well formed but not a real domain though can be resolved, so this PR changes it to be something even a web-breaking DNS server would refuse to resolve. --- src/files-regular/add-from-url.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files-regular/add-from-url.js b/src/files-regular/add-from-url.js index 49bb5119c..87d3e530d 100644 --- a/src/files-regular/add-from-url.js +++ b/src/files-regular/add-from-url.js @@ -120,7 +120,7 @@ module.exports = (createCommon, options) => { }) it('should not add from an invalid url', (done) => { - ipfs.addFromURL('http://invalid', (err, result) => { + ipfs.addFromURL('123http://invalid', (err, result) => { expect(err).to.exist() expect(result).to.not.exist() done()