Skip to content

Commit 8297aa8

Browse files
committed
chore: fix dcutr test
1 parent 29eb610 commit 8297aa8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/libp2p/test/dcutr/utils.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { multiaddr } from '@multiformats/multiaddr'
44
import { expect } from 'aegir/chai'
5+
import Sinon from 'sinon'
56
import { stubInterface } from 'sinon-ts'
67
import { isPublicAndDialable } from '../../src/dcutr/utils.js'
78
import type { Transport } from '@libp2p/interface/transport'
@@ -23,7 +24,7 @@ describe('dcutr utils', () => {
2324
for (const [key, value] of Object.entries(testCases)) {
2425
it(`should ${value ? '' : 'not '}allow ${key}`, () => {
2526
const transportManager = stubInterface<TransportManager>({
26-
transportForMultiaddr: stubInterface<Transport>()
27+
transportForMultiaddr: Sinon.stub().returns(stubInterface<Transport>())
2728
})
2829

2930
expect(isPublicAndDialable(multiaddr(key), transportManager)).to.equal(value)

0 commit comments

Comments
 (0)