22
33import { expect } from 'aegir/chai'
44import { getDescribe , getIt } from '../utils/mocha.js'
5- import { Multiaddr } from '@multiformats/multiaddr'
5+ import { multiaddr , isMultiaddr } from '@multiformats/multiaddr'
66
77/**
88 * @typedef {import('ipfsd-ctl').Factory } Factory
@@ -17,7 +17,7 @@ export function testRm (factory, options) {
1717 const it = getIt ( options )
1818
1919 const invalidArg = 'this/Is/So/Invalid/'
20- const validIp4 = new Multiaddr ( '/ip4/104.236.176.52/tcp/4001/p2p/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z' )
20+ const validIp4 = multiaddr ( '/ip4/104.236.176.52/tcp/4001/p2p/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z' )
2121
2222 describe ( '.bootstrap.rm' , function ( ) {
2323 this . timeout ( 100 * 1000 )
@@ -47,7 +47,7 @@ export function testRm (factory, options) {
4747 } )
4848
4949 it ( 'removes a peer from the bootstrap list' , async ( ) => {
50- const peer = new Multiaddr ( '/ip4/111.111.111.111/tcp/1001/p2p/QmXFX2P5ammdmXQgfqGkfswtEVFsZUJ5KeHRXQYCTdiTAb' )
50+ const peer = multiaddr ( '/ip4/111.111.111.111/tcp/1001/p2p/QmXFX2P5ammdmXQgfqGkfswtEVFsZUJ5KeHRXQYCTdiTAb' )
5151 await ipfs . bootstrap . add ( peer )
5252 let list = await ipfs . bootstrap . list ( )
5353 expect ( list . Peers ) . to . deep . include ( peer )
@@ -57,7 +57,7 @@ export function testRm (factory, options) {
5757
5858 list = await ipfs . bootstrap . list ( )
5959 expect ( list . Peers ) . to . not . deep . include ( peer )
60- expect ( res . Peers . every ( ma => Multiaddr . isMultiaddr ( ma ) ) ) . to . be . true ( )
60+ expect ( res . Peers . every ( ma => isMultiaddr ( ma ) ) ) . to . be . true ( )
6161 } )
6262 } )
6363}
0 commit comments