Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should be able to add and remove a transport', async () => {
tm.add(Transport.prototype[Symbol.toStringTag], Transport)
expect(tm._transports.size).to.equal(1)
await tm.remove(Transport.prototype[Symbol.toStringTag])
})
it('should be able to add and remove a transport', async () => {
tm.add(Transport.prototype[Symbol.toStringTag], Transport)
expect(tm._transports.size).to.equal(1)
await tm.remove(Transport.prototype[Symbol.toStringTag])
})
before(() => {
localTM = new TransportManager({
libp2p: {},
upgrader: mockUpgrader,
onConnection: () => {}
})
localTM.add(Transport.prototype[Symbol.toStringTag], Transport)
})