fix(circuit relay): Adding ability to creating and consume circuit relays

This commit is contained in:
Chris Troutner
2023-10-29 16:39:35 -07:00
parent 0690a9fb65
commit a30f2be51f
2 changed files with 37 additions and 6 deletions
+13
View File
@@ -134,6 +134,7 @@ describe('#IPFS-adapter', () => {
})
it('should create an IPFS node from Helia', async () => {
uut.config.isCircuitRelay = false
const result = await uut.createNode()
// console.log('result: ', result)
@@ -144,5 +145,17 @@ describe('#IPFS-adapter', () => {
// Stop the IPFS node
await result.stop()
})
it('should create a Circuit Relay if configured', async () => {
uut.config.isCircuitRelay = true
const result = await uut.createNode()
// Assert the returned IPFS node has expected properties
assert.property(result, 'libp2p')
assert.property(result, 'blockstore')
// Stop the IPFS node
await result.stop()
})
})
})