File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/libp2p/test/dcutr Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 22
33import { multiaddr } from '@multiformats/multiaddr'
44import { expect } from 'aegir/chai'
5+ import Sinon from 'sinon'
56import { stubInterface } from 'sinon-ts'
67import { isPublicAndDialable } from '../../src/dcutr/utils.js'
78import 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 )
You can’t perform that action at this time.
0 commit comments