From b152856c541b5a8a06c1d1f2e0dd2b45c274d408 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Mon, 18 Jun 2018 16:38:00 +0100 Subject: [PATCH 1/3] fix: removes error code checks for bitswap offline tests When run in the browser with js-ipfs-api against a stopped go-ipfs there is no error code, just a "Failed to fetch" message from the browser fetch API. The error `code` is specific to Node.js so this check has been removed. License: MIT Signed-off-by: Alan Shaw --- js/src/bitswap.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/js/src/bitswap.js b/js/src/bitswap.js index 0999e9da4..51a6c00a2 100644 --- a/js/src/bitswap.js +++ b/js/src/bitswap.js @@ -120,11 +120,6 @@ module.exports = (common) => { it('.stat gives error while offline', (done) => { ipfs.bitswap.stat((err, stats) => { expect(err).to.exist() - // When run against core we get our expected error, when run - // as part of the http tests we get a connection refused - if (err.code !== 'ECONNREFUSED') { - expect(err).to.match(/online mode/) - } expect(stats).to.not.exist() done() }) @@ -133,11 +128,6 @@ module.exports = (common) => { it('.wantlist gives error if offline', (done) => { ipfs.bitswap.wantlist((err, list) => { expect(err).to.exist() - // When run against core we get our expected error, when run - // as part of the http tests we get a connection refused - if (err.code !== 'ECONNREFUSED') { - expect(err).to.match(/online mode/) - } expect(list).to.not.exist() done() }) @@ -147,11 +137,6 @@ module.exports = (common) => { const key = 'QmUBdnXXPyoDFXj3Hj39dNJ5VkN3QFRskXxcGaYFBB8CNR' ipfs.bitswap.unwant(key, (err) => { expect(err).to.exist() - // When run against core we get our expected error, when run - // as part of the http tests we get a connection refused - if (err.code !== 'ECONNREFUSED') { - expect(err).to.match(/online mode/) - } done() }) }) From d28dd7184875cb0c0768cf95bb82b41ce57357c1 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Mon, 18 Jun 2018 16:45:03 +0100 Subject: [PATCH 2/3] chore: update contributors From d7de79652d96836f0c734177da811cb3707e7a0d Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Mon, 18 Jun 2018 16:45:03 +0100 Subject: [PATCH 3/3] chore: release version v0.68.1 --- CHANGELOG.md | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2639184f8..a5cd6b86d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ + +## [0.68.1](https://github.com/ipfs/interface-ipfs-core/compare/v0.68.0...v0.68.1) (2018-06-18) + + +### Bug Fixes + +* removes error code checks for bitswap offline tests ([b152856](https://github.com/ipfs/interface-ipfs-core/commit/b152856)) + + + # [0.68.0](https://github.com/ipfs/interface-ipfs-core/compare/v0.67.0...v0.68.0) (2018-06-18) diff --git a/package.json b/package.json index ddd940730..bbd00fb15 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "interface-ipfs-core", - "version": "0.68.0", + "version": "0.68.1", "description": "A test suite and interface you can use to implement a IPFS core interface.", "leadMaintainer": "Alan Shaw ", "main": "js/src/index.js",