orbitdb/test/utils/test-apis.js
haad 3318b6a6d9 Use ipfsd-ctl to create test IPFS instances
Fix default database creation tests
Add more test utils
Remove obsolete public methods from OrbitDB
Workaround for "underlying socket has been closed" error in replication test
Update package-lock
2018-03-27 14:30:45 +02:00

27 lines
599 B
JavaScript

const IPFS = require('ipfs')
// Available daemon types are defined in:
// https://github.com/ipfs/js-ipfsd-ctl#ipfsfactory---const-f--ipfsfactorycreateoptions
let jsIpfs = {
'js-ipfs': {
type: 'proc',
exec: IPFS,
}
}
const goIpfs = {
'go-ipfs': {
type: 'go',
}
}
// IPFS daemons to run the tests with
let testAPIs = Object.assign({}, jsIpfs)
// By default, we only run tests against js-ipfs.
// Setting env variable 'TEST=all' will make tests run with go-ipfs also.
if (process.env.TEST === 'all')
testAPIs = Object.assign({}, testAPIs, goIpfs)
module.exports = testAPIs