Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tests.miscellaneous(defaultCommonFactory, {
skip: [
{
name: 'should resolve an IPNS DNS link',
reason: 'TODO IPNS not implemented yet'
},
{
name: 'should resolve IPNS link recursively',
reason: 'TODO IPNS not implemented yet'
}
]
})
tests.name(defaultCommonFactory)
tests.object(defaultCommonFactory)
tests.pin(defaultCommonFactory)
tests.ping(defaultCommonFactory, { skip: true })
tests.pubsub(defaultCommonFactory, { skip: true })
tests.repo(defaultCommonFactory, {
skip: [
// repo.gc
{
name: 'gc',
reason: 'TODO: repo.gc is not implemented in js-ipfs yet!'
}
]
})
)), {
skip: [
// name.pubsub.cancel
{
name: 'should cancel a subscription correctly returning true',
reason: 'go-ipfs is really slow for publishing and resolving ipns records, unless in offline mode'
},
// name.pubsub.subs
{
name: 'should get the list of subscriptions updated after a resolve',
reason: 'go-ipfs is really slow for publishing and resolving ipns records, unless in offline mode'
}
]
})
tests.object(commonFactory)
tests.pin(commonFactory)
tests.ping(commonFactory, {
skip: [
{
name: 'should fail when pinging an unknown peer over pull stream',
reason: 'FIXME go-ipfs return success with text: Looking up peer '
},
{
name: 'should fail when pinging peer that is not available over readable stream',
reason: 'FIXME go-ipfs return success with text: Looking up peer '
},
{
name: 'should fail when pinging a peer that is not available',
reason: 'FIXME go-ipfs return success with text: Looking up peer '
// skip: [
// // name.pubsub.cancel
// {
// name: 'should cancel a subscription correctly returning true',
// reason: 'go-ipfs is really slow for publishing and resolving ipns records, unless in offline mode'
// },
// // name.pubsub.subs
// {
// name: 'should get the list of subscriptions updated after a resolve',
// reason: 'go-ipfs is really slow for publishing and resolving ipns records, unless in offline mode'
// }
// ]
skip: { reason: 'LITE: not implemented yet' }
})
tests.object(defaultCommon, { skip: { reason: 'LITE: not implemented yet' } })
tests.pin(defaultCommon, { skip: { reason: 'LITE: not implemented yet' } })
tests.ping(defaultCommon, {
skip: [
// TODO: LITE: add reason
'should fail when pinging a peer that is not available',
'pingReadableStream',
'should fail when pinging an unknown peer over pull stream'
]
})
tests.pubsub(CommonFactory.create({
spawnOptions: {
args: ['--enable-pubsub-experiment'],
initOptions: { bits: 1024, profile: 'test' }
tests.name(createFactory(merge(commonOptions, {
ipfsOptions: {
pass: 'ipfs-is-awesome-software',
offline: true
}
}), overrides))
tests.namePubsub(createFactory(merge(commonOptions, {
ipfsOptions: {
EXPERIMENTAL: {
ipnsPubsub: true
}
}
}), overrides))
tests.object(commonFactory)
tests.pin(commonFactory)
tests.ping(commonFactory)
tests.pubsub(createFactory(commonOptions, merge(overrides, {
go: {
args: ['--enable-pubsub-experiment']
}
})))
tests.repo(commonFactory)
tests.stats(commonFactory)
tests.swarm(commonFactory)
if (err) {
return cb(err)
}
nodes.push(_ipfsd)
cb(null, IPFSApi(_ipfsd.apiAddr))
})
}
})
},
teardown: function (callback) {
parallel(nodes.map((node) => (cb) => node.stop(cb)), callback)
}
}
test.object(common)
if (err) {
return cb(err)
}
nodes.push(_ipfsd)
cb(null, _ipfsd.api)
})
}
})
},
teardown: function (callback) {
parallel(nodes.map((node) => (cb) => node.stop(cb)), callback)
}
}
test.object(common)
tests.name(createFactory(merge(commonOptions, {
ipfsOptions: {
offline: true
}
}), overrides))
tests.namePubsub(createFactory(merge(commonOptions, {
ipfsOptions: {
EXPERIMENTAL: {
ipnsPubsub: true
}
}
}), overrides))
tests.object(commonFactory, {
skip: [
{
name: 'should respect timeout option',
reason: 'js-ipfs doesn\'t support timeout yet'
}
]
})
tests.pin(commonFactory)
tests.ping(commonFactory)
tests.pubsub(createFactory(commonOptions, merge(overrides, {
go: {
args: ['--enable-pubsub-experiment']
}
},
teardown (cb) {
factory.dismantle(cb)
}
}
test.block(common)
test.bootstrap(common)
test.config(common)
test.dag(common)
test.dht(common)
test.files(common)
test.filesMFS(common)
test.key(common)
test.miscellaneous(common)
test.object(common)
test.pin(common)
test.ping(common)
test.pubsub(common)
test.repo(common)
test.stats(common)
test.swarm(common)
if (err) {
return cb(err)
}
nodes.push(_ipfsd)
cb(null, _ipfsd.api)
})
}
})
},
teardown: function (callback) {
parallel(nodes.map((node) => (cb) => node.stop(cb)), callback)
}
}
test.object(common)