From 77b915efbc97ffd6eb5a8a73aa56e341c2f6320e Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 9 Nov 2017 03:16:54 +1300 Subject: [PATCH 01/19] fix: export files with a POSIX path --- src/exporter/dir-flat.js | 3 +-- src/exporter/dir-hamt-sharded.js | 3 +-- src/exporter/object.js | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/exporter/dir-flat.js b/src/exporter/dir-flat.js index 8d04c1d5..9392018e 100644 --- a/src/exporter/dir-flat.js +++ b/src/exporter/dir-flat.js @@ -1,6 +1,5 @@ 'use strict' -const path = require('path') const pull = require('pull-stream') const paramap = require('pull-paramap') const CID = require('cids') @@ -22,7 +21,7 @@ function dirExporter (node, name, pathRest, ipldResolver, resolve, parent) { pull.values(node.links), pull.map((link) => ({ linkName: link.name, - path: path.join(name, link.name), + path: name + '/' + link.name, hash: link.multihash })), pull.filter((item) => accepts === undefined || item.linkName === accepts), diff --git a/src/exporter/dir-hamt-sharded.js b/src/exporter/dir-hamt-sharded.js index c301169a..1bf81c51 100644 --- a/src/exporter/dir-hamt-sharded.js +++ b/src/exporter/dir-hamt-sharded.js @@ -1,6 +1,5 @@ 'use strict' -const path = require('path') const pull = require('pull-stream') const paramap = require('pull-paramap') const CID = require('cids') @@ -25,7 +24,7 @@ function shardedDirExporter (node, name, pathRest, ipldResolver, resolve, parent pull.map((link) => { // remove the link prefix (2 chars for the bucket index) const p = link.name.substring(2) - const pp = p ? path.join(name, p) : name + const pp = p ? name + '/' + p : name let accept = true let fromPathRest = false diff --git a/src/exporter/object.js b/src/exporter/object.js index c58ac0ed..af24a970 100644 --- a/src/exporter/object.js +++ b/src/exporter/object.js @@ -1,6 +1,5 @@ 'use strict' -const path = require('path') const CID = require('cids') const pull = require('pull-stream') const pullDefer = require('pull-defer') @@ -10,7 +9,7 @@ module.exports = (node, name, pathRest, ipldResolver, resolve) => { if (pathRest.length) { const pathElem = pathRest.shift() newNode = node[pathElem] - const newName = path.join(name, pathElem) + const newName = name + '/' + pathElem if (CID.isCID(newNode)) { const d = pullDefer.source() ipldResolver.get(sanitizeCID(newNode), (err, newNode) => { From 880ae4def73cd18ec7550c338ac840d24e517c71 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 9 Nov 2017 03:19:16 +1300 Subject: [PATCH 02/19] test(with-dag-api): some fixup for windows It is still failing, because it uses IPFS for testing and IPFS is not yet windows ready. --- test/with-dag-api.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/with-dag-api.js b/test/with-dag-api.js index d7ad29d6..fc461b9b 100644 --- a/test/with-dag-api.js +++ b/test/with-dag-api.js @@ -13,6 +13,8 @@ const pull = require('pull-stream') const mh = require('multihashes') const loadFixture = require('aegir/fixtures') const IPFS = require('ipfs') +const os = require('os') +const path = require('path') function stringifyMh (files) { return files.map((file) => { @@ -171,13 +173,15 @@ describe('with dag-api', () => { } } - before((done) => { + before(function (done) { + this.timeout(20 * 1000) + node = new IPFS({ - repo: '/tmp/unixfs-test-' + Math.random(), + repo: path.join(os.tmpdir(), 'unixfs-test-' + Math.random()), start: false }) - node.on('ready', done) + node.on('ready', err => { if (err) console.log('ready', err); done(err) }) }) it('fails on bad input', (done) => { From 2773541ccb9d51d9a9e93f26f987fa48694a420f Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 9 Nov 2017 03:22:34 +1300 Subject: [PATCH 03/19] chore: run on appveyor --- .appveyor.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000..de3e3780 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,23 @@ +environment: + matrix: + - nodejs_version: "6" + - nodejs_version: "8" + +# cache: +# - node_modules + +platform: + - x64 + +install: + - ps: Install-Product node $env:nodejs_version $env:platform + - npm install + +test_script: + - node --version + - npm --version + - npm test + +build: off + +version: "{build}" From c6f2bffcda9db07df1a6ef7095c9fc66dae022e6 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 9 Nov 2017 11:19:43 +1300 Subject: [PATCH 04/19] test: run more tests in the browser --- test/browser.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/browser.js b/test/browser.js index 6cf3280f..f562e55d 100644 --- a/test/browser.js +++ b/test/browser.js @@ -48,17 +48,15 @@ describe('IPFS data importing tests on the Browser', function () { require('./builder-balanced') require('./builder-trickle-dag') require('./builder-only-hash')(repo) - // TODO: make these tests not require data on the repo - // require('./builder-dir-sharding')(repo) + require('./builder-dir-sharding')(repo) // Importer require('./importer')(repo) require('./importer-flush')(repo) // Exporter - // TODO: make these tests not require data on the repo - // require('./exporter')(repo) - // require('./exporter-subtree')(repo) + require('./exporter')(repo) + require('./exporter-subtree')(repo) // Other require('./import-export')(repo) From fc58627170b98d2ef07ce30c3c458495573249f9 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 9 Nov 2017 11:20:29 +1300 Subject: [PATCH 05/19] test: timeout --- test/hamt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/hamt.js b/test/hamt.js index 8ccebb1f..dc07ca25 100644 --- a/test/hamt.js +++ b/test/hamt.js @@ -97,7 +97,7 @@ describe('HAMT', () => { }) it('can remove all the keys and still find remaining', function (done) { - this.timeout(10 * 1000) + this.timeout(50 * 1000) masterHead = keys.pop() iterate() From 06796a975e8fa5f21df7de3617f0c62123ab2ad9 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 9 Nov 2017 11:20:58 +1300 Subject: [PATCH 06/19] test: remove debug code --- test/with-dag-api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/with-dag-api.js b/test/with-dag-api.js index fc461b9b..7f58ea79 100644 --- a/test/with-dag-api.js +++ b/test/with-dag-api.js @@ -181,7 +181,7 @@ describe('with dag-api', () => { start: false }) - node.on('ready', err => { if (err) console.log('ready', err); done(err) }) + node.on('ready', done) }) it('fails on bad input', (done) => { From 229f4b1af4e53bf145f25fce836bfe3e9a98b038 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 9 Nov 2017 11:28:57 +1300 Subject: [PATCH 07/19] test: fix lint issues --- test/import-export.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/import-export.js b/test/import-export.js index e09b87a0..54def303 100644 --- a/test/import-export.js +++ b/test/import-export.js @@ -1,4 +1,5 @@ /* eslint-env mocha */ +/* eslint max-nested-callbacks: ["error", 5] */ 'use strict' const chai = require('chai') From 1a942d9931ca02b8ad7d3a556c1078681e4e275a Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 9 Nov 2017 13:14:41 +1300 Subject: [PATCH 08/19] test(browser): are taking forever!!! --- package.json | 2 +- test/exporter-subtree.js | 6 +++--- test/exporter.js | 8 ++++---- test/importer.js | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index a53f215a..d19f78d5 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "build": "aegir build", "test": "aegir test", "test:node": "aegir test --target node", - "test:browser": "aegir test --target browser", + "test:browser": "aegir test --target browser --timeout 30000", "release": "aegir release", "release-minor": "aegir release --type minor", "release-major": "aegir release --type major", diff --git a/test/exporter-subtree.js b/test/exporter-subtree.js index 3987abd6..2a81b181 100644 --- a/test/exporter-subtree.js +++ b/test/exporter-subtree.js @@ -36,7 +36,7 @@ module.exports = (repo) => { fileEql(files[0], smallFile, done) }) ) - }) + }).timeout(10 * 1000) it('export dir 1 level down', (done) => { const hash = 'QmWChcSFMNcFkfeJtNd8Yru1rE6PhtCRfewi1tMwjkwKjN/level-1' @@ -52,7 +52,7 @@ module.exports = (repo) => { fileEql(files[1], smallFile, done) }) ) - }) + }).timeout(10 * 1000) it('export a non existing file', (done) => { const hash = 'QmWChcSFMNcFkfeJtNd8Yru1rE6PhtCRfewi1tMwjkwKjN/doesnotexist' @@ -65,7 +65,7 @@ module.exports = (repo) => { done() }) ) - }) + }).timeout(10 * 1000) it('exports starting from non-protobuf node', (done) => { const doc = { a: { file: new CID('QmWChcSFMNcFkfeJtNd8Yru1rE6PhtCRfewi1tMwjkwKjN') } } diff --git a/test/exporter.js b/test/exporter.js index 81582470..eacbbb21 100644 --- a/test/exporter.js +++ b/test/exporter.js @@ -83,7 +83,7 @@ module.exports = (repo) => { fileEql(files[0], bigFile, done) }) ) - }) + }).timeout(30 * 1000) it('export a small file with links using CID instead of multihash', (done) => { const cid = new CID('QmW7BDxEbGqxxSYVtn3peNPQgdDXbWkoQ6J1EFYAEuQV3Q') @@ -96,7 +96,7 @@ module.exports = (repo) => { fileEql(files[0], bigFile, done) }) ) - }) + }).timeout(30 * 1000) it('export a large file > 5mb', (done) => { const hash = 'QmRQgufjp9vLE8XK2LGKZSsPCFCF6e4iynCQtNB5X2HBKE' @@ -109,7 +109,7 @@ module.exports = (repo) => { fileEql(files[0], null, done) }) ) - }) + }).timeout(30 * 1000) it('export a directory', (done) => { const hash = 'QmWChcSFMNcFkfeJtNd8Yru1rE6PhtCRfewi1tMwjkwKjN' @@ -149,7 +149,7 @@ module.exports = (repo) => { ) }) ) - }) + }).timeout(30 * 1000) it('returns an empty stream for dir', (done) => { const hash = 'QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn' diff --git a/test/importer.js b/test/importer.js index e1edfe62..cdc74333 100644 --- a/test/importer.js +++ b/test/importer.js @@ -161,7 +161,7 @@ module.exports = (repo) => { const expected = extend({}, defaultResults, strategies[strategy]) describe('importer: ' + strategy, function () { - this.timeout(20 * 1000) + this.timeout(30 * 1000) let ipldResolver From b4bba29607dbe93b62b99c022b3f84830992cb54 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 9 Nov 2017 13:16:36 +1300 Subject: [PATCH 09/19] test: skip with-dag-api until #196 is resolved --- test/with-dag-api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/with-dag-api.js b/test/with-dag-api.js index 7f58ea79..048dff83 100644 --- a/test/with-dag-api.js +++ b/test/with-dag-api.js @@ -107,7 +107,8 @@ const strategyOverrides = { } -describe('with dag-api', () => { +// TODO: waiting for IPFS support on windows, https://github.com/ipfs/js-ipfs-unixfs-engine/issues/196 +describe.skip('with dag-api', () => { strategies.forEach(strategy => { const baseFiles = strategyBaseFiles[strategy] const defaultResults = extend({}, baseFiles, { From 1e8aaadacd4d2681d447300572d163876385bcba Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Thu, 9 Nov 2017 13:28:12 +1300 Subject: [PATCH 10/19] test: more timeouts --- test/builder-dir-sharding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/builder-dir-sharding.js b/test/builder-dir-sharding.js index 42f029bd..203e63c2 100644 --- a/test/builder-dir-sharding.js +++ b/test/builder-dir-sharding.js @@ -18,7 +18,7 @@ const leftPad = require('left-pad') module.exports = (repo) => { describe('builder: directory sharding', function () { - this.timeout(20 * 1000) + this.timeout(30 * 1000) let ipldResolver From 481453d711833021f806aa16f88b97010fd429d9 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Fri, 10 Nov 2017 12:36:31 +1300 Subject: [PATCH 11/19] Revert "test: run more tests in the browser" This reverts commit c6f2bffcda9db07df1a6ef7095c9fc66dae022e6. --- test/browser.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/browser.js b/test/browser.js index f562e55d..6cf3280f 100644 --- a/test/browser.js +++ b/test/browser.js @@ -48,15 +48,17 @@ describe('IPFS data importing tests on the Browser', function () { require('./builder-balanced') require('./builder-trickle-dag') require('./builder-only-hash')(repo) - require('./builder-dir-sharding')(repo) + // TODO: make these tests not require data on the repo + // require('./builder-dir-sharding')(repo) // Importer require('./importer')(repo) require('./importer-flush')(repo) // Exporter - require('./exporter')(repo) - require('./exporter-subtree')(repo) + // TODO: make these tests not require data on the repo + // require('./exporter')(repo) + // require('./exporter-subtree')(repo) // Other require('./import-export')(repo) From 227cfff727533706571d7a0205fbcf1934245147 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Fri, 10 Nov 2017 13:11:40 +1300 Subject: [PATCH 12/19] test: more testing issues --- package.json | 2 +- test/import-export.js | 4 +++- test/with-dag-api.js | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d19f78d5..a53f215a 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "build": "aegir build", "test": "aegir test", "test:node": "aegir test --target node", - "test:browser": "aegir test --target browser --timeout 30000", + "test:browser": "aegir test --target browser", "release": "aegir release", "release-minor": "aegir release --type minor", "release-major": "aegir release --type major", diff --git a/test/import-export.js b/test/import-export.js index 54def303..7ee21c95 100644 --- a/test/import-export.js +++ b/test/import-export.js @@ -33,7 +33,9 @@ function fileEql (f1, fileData, callback) { } module.exports = (repo) => { - describe('import and export', () => { + describe('import and export', function() { + this.timeout(30 * 1000) + strategies.forEach((strategy) => { const importerOptions = { strategy: strategy } diff --git a/test/with-dag-api.js b/test/with-dag-api.js index 048dff83..c9bcd415 100644 --- a/test/with-dag-api.js +++ b/test/with-dag-api.js @@ -107,8 +107,12 @@ const strategyOverrides = { } -// TODO: waiting for IPFS support on windows, https://github.com/ipfs/js-ipfs-unixfs-engine/issues/196 -describe.skip('with dag-api', () => { +describe('with dag-api', function() { + // TODO: waiting for IPFS support on windows, https://github.com/ipfs/js-ipfs-unixfs-engine/issues/196 + if (os.platform() === 'win32') { + return this.skip(); + } + strategies.forEach(strategy => { const baseFiles = strategyBaseFiles[strategy] const defaultResults = extend({}, baseFiles, { From 097472c40d5d77f71eda5ec7ed3de3f4c67db874 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Fri, 10 Nov 2017 13:31:32 +1300 Subject: [PATCH 13/19] chore: npm ERR! peer dep missing: ajv@^5.0.0, required by ajv-keywords@2.1.1 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index a53f215a..f5bb677c 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "homepage": "https://github.com/ipfs/js-ipfs-unixfs-engine#readme", "devDependencies": { "aegir": "^12.1.3", + "ajv" : "^5.0.0", "chai": "^4.1.2", "dirty-chai": "^2.0.1", "ipfs": "~0.26.0", From 7e59d26eaea9476247803d9cde676cadc7ae76ac Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Fri, 10 Nov 2017 13:44:40 +1300 Subject: [PATCH 14/19] test: lint issues --- test/import-export.js | 2 +- test/with-dag-api.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/import-export.js b/test/import-export.js index 7ee21c95..923cace7 100644 --- a/test/import-export.js +++ b/test/import-export.js @@ -33,7 +33,7 @@ function fileEql (f1, fileData, callback) { } module.exports = (repo) => { - describe('import and export', function() { + describe('import and export', function () { this.timeout(30 * 1000) strategies.forEach((strategy) => { diff --git a/test/with-dag-api.js b/test/with-dag-api.js index c9bcd415..74baa05a 100644 --- a/test/with-dag-api.js +++ b/test/with-dag-api.js @@ -110,7 +110,7 @@ const strategyOverrides = { describe('with dag-api', function() { // TODO: waiting for IPFS support on windows, https://github.com/ipfs/js-ipfs-unixfs-engine/issues/196 if (os.platform() === 'win32') { - return this.skip(); + return } strategies.forEach(strategy => { From badb634e0ec08da70b5471ac1948745c344c036c Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Fri, 10 Nov 2017 14:07:06 +1300 Subject: [PATCH 15/19] test: more issues --- test/exporter-subtree.js | 8 +++++--- test/with-dag-api.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/exporter-subtree.js b/test/exporter-subtree.js index 2a81b181..eafe4755 100644 --- a/test/exporter-subtree.js +++ b/test/exporter-subtree.js @@ -16,7 +16,9 @@ const exporter = unixFSEngine.exporter const smallFile = loadFixture(__dirname, 'fixtures/200Bytes.txt') module.exports = (repo) => { - describe('exporter', () => { + describe('exporter', function () { + this.timeout(10 * 1000) + let ipldResolver before(() => { @@ -52,7 +54,7 @@ module.exports = (repo) => { fileEql(files[1], smallFile, done) }) ) - }).timeout(10 * 1000) + }) it('export a non existing file', (done) => { const hash = 'QmWChcSFMNcFkfeJtNd8Yru1rE6PhtCRfewi1tMwjkwKjN/doesnotexist' @@ -65,7 +67,7 @@ module.exports = (repo) => { done() }) ) - }).timeout(10 * 1000) + }) it('exports starting from non-protobuf node', (done) => { const doc = { a: { file: new CID('QmWChcSFMNcFkfeJtNd8Yru1rE6PhtCRfewi1tMwjkwKjN') } } diff --git a/test/with-dag-api.js b/test/with-dag-api.js index 74baa05a..27dec89c 100644 --- a/test/with-dag-api.js +++ b/test/with-dag-api.js @@ -107,7 +107,7 @@ const strategyOverrides = { } -describe('with dag-api', function() { +describe('with dag-api', function () { // TODO: waiting for IPFS support on windows, https://github.com/ipfs/js-ipfs-unixfs-engine/issues/196 if (os.platform() === 'win32') { return From c2842e6c88a419cd2143a7690100a274c6da15a9 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Fri, 10 Nov 2017 14:39:49 +1300 Subject: [PATCH 16/19] test: follow the standards --- test/exporter-subtree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/exporter-subtree.js b/test/exporter-subtree.js index eafe4755..d2c59048 100644 --- a/test/exporter-subtree.js +++ b/test/exporter-subtree.js @@ -38,7 +38,7 @@ module.exports = (repo) => { fileEql(files[0], smallFile, done) }) ) - }).timeout(10 * 1000) + }) it('export dir 1 level down', (done) => { const hash = 'QmWChcSFMNcFkfeJtNd8Yru1rE6PhtCRfewi1tMwjkwKjN/level-1' From 729177f27a7221f8b8f301a37496cf7306fc6a60 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Fri, 10 Nov 2017 15:12:48 +1300 Subject: [PATCH 17/19] test: ipfs-repo@0.18.3 breaks our tests --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f5bb677c..6669fc38 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "dirty-chai": "^2.0.1", "ipfs": "~0.26.0", "ipfs-block-service": "~0.13.0", - "ipfs-repo": "~0.18.3", + "ipfs-repo": "0.18.2", "ncp": "^2.0.0", "pre-commit": "^1.2.2", "pull-generate": "^2.2.0", From 377696d82d701d06b33d34fc2ad23ec1f79dcb8b Mon Sep 17 00:00:00 2001 From: David Dias Date: Fri, 10 Nov 2017 09:41:19 +0000 Subject: [PATCH 18/19] chore: bump deps --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6669fc38..200e0b6b 100644 --- a/package.json +++ b/package.json @@ -41,12 +41,12 @@ "homepage": "https://github.com/ipfs/js-ipfs-unixfs-engine#readme", "devDependencies": { "aegir": "^12.1.3", - "ajv" : "^5.0.0", + "ajv": "^5.3.0", "chai": "^4.1.2", "dirty-chai": "^2.0.1", "ipfs": "~0.26.0", "ipfs-block-service": "~0.13.0", - "ipfs-repo": "0.18.2", + "ipfs-repo": "0.18.3", "ncp": "^2.0.0", "pre-commit": "^1.2.2", "pull-generate": "^2.2.0", From 6274a6c22cbc1e59026b0e0c39e5bc7c709cc192 Mon Sep 17 00:00:00 2001 From: David Dias Date: Fri, 10 Nov 2017 10:19:33 +0000 Subject: [PATCH 19/19] chore: bump timeouts for nodejs 6 --- test/import-export-nested-dir.js | 8 ++++++-- test/with-dag-api.js | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/import-export-nested-dir.js b/test/import-export-nested-dir.js index da448abf..86eae4af 100644 --- a/test/import-export-nested-dir.js +++ b/test/import-export-nested-dir.js @@ -22,7 +22,9 @@ module.exports = (repo) => { ipldResolver = new IPLDResolver(bs) }) - it('imports', (done) => { + it('imports', function (done) { + this.timeout(20 * 1000) + pull( pull.values([ { path: 'a/b/c/d/e', content: pull.values([Buffer.from('banana')]) }, @@ -56,7 +58,9 @@ module.exports = (repo) => { ) }) - it('exports', done => { + it('exports', function (done) { + this.timeout(20 * 1000) + pull( unixFSEngine.exporter(rootHash, ipldResolver), pull.collect((err, files) => { diff --git a/test/with-dag-api.js b/test/with-dag-api.js index 27dec89c..b7b50024 100644 --- a/test/with-dag-api.js +++ b/test/with-dag-api.js @@ -166,7 +166,7 @@ describe('with dag-api', function () { const expected = extend({}, defaultResults, strategies[strategy]) describe('importer: ' + strategy, function () { - this.timeout(20 * 1000) + this.timeout(50 * 1000) let node @@ -179,7 +179,7 @@ describe('with dag-api', function () { } before(function (done) { - this.timeout(20 * 1000) + this.timeout(30 * 1000) node = new IPFS({ repo: path.join(os.tmpdir(), 'unixfs-test-' + Math.random()),