forked from ipfs/js-ipfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
118 changed files
with
2,120 additions
and
850 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,23 @@ | ||
'use strict' | ||
|
||
const parallel = require('async/parallel') | ||
const ads = require('./test/utils/another-daemon-spawner') | ||
const js = ads.spawnJsNode | ||
const stop = ads.stopNodes | ||
|
||
/* | ||
* spawns a daemon with ports numbers starting in 10 and ending in `num` | ||
*/ | ||
function start (done) { | ||
const base = '/ip4/127.0.0.1/tcp' | ||
if (!process.env.IPFS_TEST) { | ||
parallel([ | ||
(cb) => js([`${base}/10007`, `${base}/20007/ws`], true, 31007, 32007, cb), | ||
(cb) => js([`${base}/10008`, `${base}/20008/ws`], true, 31008, 32008, cb), | ||
(cb) => js([`${base}/10012`, `${base}/20012/ws`], true, 31012, 32012, cb), | ||
(cb) => js([`${base}/10013`, `${base}/20013/ws`], true, 31013, 32013, cb), | ||
(cb) => js([`${base}/10014`, `${base}/20014/ws`], true, 31014, 32014, cb), | ||
(cb) => js([`${base}/10015`, `${base}/20015/ws`], true, 31015, 32015, cb) | ||
], done) | ||
} else if (process.env.IPFS_TEST === 'bootstrapers') { | ||
done() | ||
} | ||
} | ||
const createServer = require('ipfsd-ctl').createServer | ||
|
||
const server = createServer() | ||
module.exports = { | ||
karma: { | ||
files: [{ | ||
pattern: 'node_modules/interface-ipfs-core/test/fixtures/**/*', | ||
pattern: 'node_modules/interface-ipfs-core/js/test/fixtures/**/*', | ||
watched: false, | ||
served: true, | ||
included: false, | ||
singleRun: false | ||
}] | ||
included: false | ||
}], | ||
browserNoActivityTimeout: 100 * 1000, | ||
singleRun: true | ||
}, | ||
hooks: { | ||
pre: start, | ||
post: stop | ||
browser: { | ||
pre: server.start.bind(server), | ||
post: server.stop.bind(server) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,4 @@ test/test-data/go-ipfs-repo/LOG.old | |
|
||
# while testing npm5 | ||
package-lock.json | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.