Skip to content

Commit

Permalink
feat: fix webworker tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Nov 29, 2022
1 parent 298f534 commit e370e56
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion test/interface-tests.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,11 @@ function executeTests (commonFactory) {
name: 'should list pins with metadata',
reason: 'not implemented in kubo'
}
]
].concat(isWebWorker
? [
'should pin dag-cbor' // only seems to fail when running all tests together.
].map((name) => ({ name, reason: 'FIXME: https://github.com/ipfs/js-kubo-rpc-client/issues/56' }))
: [])
})

tests.ping(commonFactory, {
Expand Down
4 changes: 2 additions & 2 deletions test/interface-tests/src/pubsub/peers.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export function testPeers (factory, options) {
before(async () => {
ipfs1 = (await factory.spawn({ ipfsOptions })).api
// webworkers are not dialable because webrtc is not available
ipfs2 = (await factory.spawn({ type: isWebWorker ? 'js' : undefined, ipfsOptions })).api
ipfs3 = (await factory.spawn({ type: isWebWorker ? 'js' : undefined, ipfsOptions })).api
ipfs2 = (await factory.spawn({ type: 'go', ipfsOptions })).api
ipfs3 = (await factory.spawn({ type: 'go', ipfsOptions })).api

ipfs2Id = await ipfs2.id()
ipfs3Id = await ipfs3.id()
Expand Down
2 changes: 1 addition & 1 deletion test/interface-tests/src/pubsub/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function testSubscribe (factory, options) {
ipfs1 = (await factory.spawn({ ipfsOptions })).api

// webworkers are not dialable because webrtc is not available
ipfs2 = (await factory.spawn({ type: isWebWorker ? 'js' : undefined, ipfsOptions })).api
ipfs2 = (await factory.spawn({ type: undefined, ipfsOptions })).api

ipfs1Id = await ipfs1.id()
ipfs2Id = await ipfs2.id()
Expand Down

0 comments on commit e370e56

Please sign in to comment.