@libp2p/interface-compliance-tests 1.1.20 → 1.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/src/connection/connection.js +1 -1
  2. package/dist/src/connection/connection.js.map +1 -1
  3. package/dist/src/connection-encrypter/index.js +1 -1
  4. package/dist/src/connection-encrypter/index.js.map +1 -1
  5. package/dist/src/mocks/upgrader.js +1 -1
  6. package/dist/src/mocks/upgrader.js.map +1 -1
  7. package/dist/src/peer-discovery/index.js +1 -1
  8. package/dist/src/peer-discovery/index.js.map +1 -1
  9. package/dist/src/pubsub/api.d.ts.map +1 -1
  10. package/dist/src/pubsub/api.js +11 -9
  11. package/dist/src/pubsub/api.js.map +1 -1
  12. package/dist/src/pubsub/connection-handlers.d.ts.map +1 -1
  13. package/dist/src/pubsub/connection-handlers.js +42 -28
  14. package/dist/src/pubsub/connection-handlers.js.map +1 -1
  15. package/dist/src/pubsub/emit-self.d.ts.map +1 -1
  16. package/dist/src/pubsub/emit-self.js +13 -8
  17. package/dist/src/pubsub/emit-self.js.map +1 -1
  18. package/dist/src/pubsub/messages.d.ts.map +1 -1
  19. package/dist/src/pubsub/messages.js +6 -5
  20. package/dist/src/pubsub/messages.js.map +1 -1
  21. package/dist/src/pubsub/multiple-nodes.d.ts.map +1 -1
  22. package/dist/src/pubsub/multiple-nodes.js +96 -40
  23. package/dist/src/pubsub/multiple-nodes.js.map +1 -1
  24. package/dist/src/pubsub/two-nodes.d.ts.map +1 -1
  25. package/dist/src/pubsub/two-nodes.js +35 -50
  26. package/dist/src/pubsub/two-nodes.js.map +1 -1
  27. package/dist/src/pubsub/utils.js +1 -1
  28. package/dist/src/pubsub/utils.js.map +1 -1
  29. package/dist/src/record/index.js +1 -1
  30. package/dist/src/record/index.js.map +1 -1
  31. package/dist/src/stream-muxer/base-test.js +1 -1
  32. package/dist/src/stream-muxer/base-test.js.map +1 -1
  33. package/dist/src/stream-muxer/close-test.js +1 -1
  34. package/dist/src/stream-muxer/close-test.js.map +1 -1
  35. package/dist/src/stream-muxer/spawner.js +1 -1
  36. package/dist/src/stream-muxer/spawner.js.map +1 -1
  37. package/dist/src/topology/topology.js +1 -1
  38. package/dist/src/topology/topology.js.map +1 -1
  39. package/dist/src/transport/dial-test.js +1 -1
  40. package/dist/src/transport/dial-test.js.map +1 -1
  41. package/dist/src/transport/filter-test.js +1 -1
  42. package/dist/src/transport/filter-test.js.map +1 -1
  43. package/dist/src/transport/listen-test.js +1 -1
  44. package/dist/src/transport/listen-test.js.map +1 -1
  45. package/package.json +14 -15
  46. package/src/connection/connection.ts +1 -1
  47. package/src/connection-encrypter/index.ts +1 -1
  48. package/src/mocks/upgrader.ts +1 -1
  49. package/src/peer-discovery/index.ts +1 -1
  50. package/src/pubsub/api.ts +11 -9
  51. package/src/pubsub/connection-handlers.ts +44 -29
  52. package/src/pubsub/emit-self.ts +13 -8
  53. package/src/pubsub/messages.ts +6 -5
  54. package/src/pubsub/multiple-nodes.ts +97 -42
  55. package/src/pubsub/two-nodes.ts +38 -56
  56. package/src/pubsub/utils.ts +1 -1
  57. package/src/record/index.ts +1 -1
  58. package/src/stream-muxer/base-test.ts +1 -1
  59. package/src/stream-muxer/close-test.ts +1 -1
  60. package/src/stream-muxer/spawner.ts +1 -1
  61. package/src/topology/topology.ts +1 -1
  62. package/src/transport/dial-test.ts +1 -1
  63. package/src/transport/filter-test.ts +1 -1
  64. package/src/transport/listen-test.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /* eslint max-nested-callbacks: ["error", 6] */
2
- import { expect } from 'aegir/utils/chai.js'
2
+ import { expect } from 'aegir/chai'
3
3
  import sinon from 'sinon'
4
4
  import pDefer from 'p-defer'
5
5
  import pWaitFor from 'p-wait-for'
@@ -7,7 +7,6 @@ import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
7
7
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
8
8
  import { createEd25519PeerId } from '@libp2p/peer-id-factory'
9
9
  import { connectPeers, mockRegistrar } from '../mocks/registrar.js'
10
- import { CustomEvent } from '@libp2p/interfaces'
11
10
  import { waitForSubscriptionUpdate } from './utils.js'
12
11
  import type { TestSetup } from '../index.js'
13
12
  import type { Message } from '@libp2p/interfaces/pubsub'
@@ -149,7 +148,7 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
149
148
  psC.subscribe(topic)
150
149
  expect(psC.getTopics()).to.deep.equal([topic])
151
150
 
152
- psB.addEventListener('pubsub:subscription-change', () => {
151
+ psB.addEventListener('subscription-change', () => {
153
152
  expect(psA.getPeers().length).to.equal(1)
154
153
  expect(psB.getPeers().length).to.equal(2)
155
154
  expect(psB.getSubscribers(topic).map(p => p.toString())).to.deep.equal([peerIdC.toString()])
@@ -172,9 +171,21 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
172
171
 
173
172
  let counter = 0
174
173
 
175
- psA.addEventListener(topic, incMsg)
176
- psB.addEventListener(topic, incMsg)
177
- psC.addEventListener(topic, incMsg)
174
+ psA.addEventListener('message', (evt) => {
175
+ if (evt.detail.topic === topic) {
176
+ incMsg(evt)
177
+ }
178
+ })
179
+ psB.addEventListener('message', (evt) => {
180
+ if (evt.detail.topic === topic) {
181
+ incMsg(evt)
182
+ }
183
+ })
184
+ psC.addEventListener('message', (evt) => {
185
+ if (evt.detail.topic === topic) {
186
+ incMsg(evt)
187
+ }
188
+ })
178
189
 
179
190
  await Promise.all([
180
191
  waitForSubscriptionUpdate(psA, psB),
@@ -182,7 +193,7 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
182
193
  waitForSubscriptionUpdate(psC, psB)
183
194
  ])
184
195
 
185
- void psA.dispatchEvent(new CustomEvent<Uint8Array>(topic, { detail: uint8ArrayFromString('hey') }))
196
+ psA.publish(topic, uint8ArrayFromString('hey'))
186
197
 
187
198
  function incMsg (evt: CustomEvent<Message>) {
188
199
  const msg = evt.detail
@@ -192,9 +203,21 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
192
203
 
193
204
  function check () {
194
205
  if (++counter === 3) {
195
- psA.removeEventListener(topic, incMsg)
196
- psB.removeEventListener(topic, incMsg)
197
- psC.removeEventListener(topic, incMsg)
206
+ psA.removeEventListener('message', (evt) => {
207
+ if (evt.detail.topic === topic) {
208
+ incMsg(evt)
209
+ }
210
+ })
211
+ psB.removeEventListener('message', (evt) => {
212
+ if (evt.detail.topic === topic) {
213
+ incMsg(evt)
214
+ }
215
+ })
216
+ psC.removeEventListener('message', (evt) => {
217
+ if (evt.detail.topic === topic) {
218
+ incMsg(evt)
219
+ }
220
+ })
198
221
  defer.resolve()
199
222
  }
200
223
  }
@@ -216,34 +239,33 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
216
239
  const defer = pDefer()
217
240
  let counter = 0
218
241
 
242
+ psA.addEventListener('message', (evt) => {
243
+ if (evt.detail.topic === topic) {
244
+ incMsg(evt)
245
+ }
246
+ })
247
+ psB.addEventListener('message', (evt) => {
248
+ if (evt.detail.topic === topic) {
249
+ incMsg(evt)
250
+ }
251
+ })
252
+ psC.addEventListener('message', (evt) => {
253
+ if (evt.detail.topic === topic) {
254
+ incMsg(evt)
255
+ }
256
+ })
257
+
219
258
  psA.subscribe(topic)
220
259
  psB.subscribe(topic)
221
260
  psC.subscribe(topic)
222
261
 
223
- // await subscription change
224
- await Promise.all([
225
- new Promise(resolve => psA.addEventListener('pubsub:subscription-change', () => resolve(null), {
226
- once: true
227
- })),
228
- new Promise(resolve => psB.addEventListener('pubsub:subscription-change', () => resolve(null), {
229
- once: true
230
- })),
231
- new Promise(resolve => psC.addEventListener('pubsub:subscription-change', () => resolve(null), {
232
- once: true
233
- }))
234
- ])
235
-
236
- psA.addEventListener(topic, incMsg)
237
- psB.addEventListener(topic, incMsg)
238
- psC.addEventListener(topic, incMsg)
239
-
240
262
  await Promise.all([
241
263
  waitForSubscriptionUpdate(psA, psB),
242
264
  waitForSubscriptionUpdate(psB, psA),
243
265
  waitForSubscriptionUpdate(psC, psB)
244
266
  ])
245
267
 
246
- void psB.dispatchEvent(new CustomEvent<Uint8Array>(topic, { detail: uint8ArrayFromString('hey') }))
268
+ psB.publish(topic, uint8ArrayFromString('hey'))
247
269
 
248
270
  function incMsg (evt: CustomEvent<Message>) {
249
271
  const msg = evt.detail
@@ -253,9 +275,21 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
253
275
 
254
276
  function check () {
255
277
  if (++counter === 3) {
256
- psA.removeEventListener(topic, incMsg)
257
- psB.removeEventListener(topic, incMsg)
258
- psC.removeEventListener(topic, incMsg)
278
+ psA.removeEventListener('message', (evt) => {
279
+ if (evt.detail.topic === topic) {
280
+ incMsg(evt)
281
+ }
282
+ })
283
+ psB.removeEventListener('message', (evt) => {
284
+ if (evt.detail.topic === topic) {
285
+ incMsg(evt)
286
+ }
287
+ })
288
+ psC.removeEventListener('message', (evt) => {
289
+ if (evt.detail.topic === topic) {
290
+ incMsg(evt)
291
+ }
292
+ })
259
293
  defer.resolve()
260
294
  }
261
295
  }
@@ -415,17 +449,38 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
415
449
  it('publishes from c', async function () {
416
450
  const defer = pDefer()
417
451
  let counter = 0
452
+ const topic = 'Z'
418
453
 
419
- psA.subscribe('Z')
420
- psA.addEventListener('Z', incMsg)
421
- psB.subscribe('Z')
422
- psB.addEventListener('Z', incMsg)
423
- psC.subscribe('Z')
424
- psC.addEventListener('Z', incMsg)
425
- psD.subscribe('Z')
426
- psD.addEventListener('Z', incMsg)
427
- psE.subscribe('Z')
428
- psE.addEventListener('Z', incMsg)
454
+ psA.subscribe(topic)
455
+ psA.addEventListener('message', (evt) => {
456
+ if (evt.detail.topic === topic) {
457
+ incMsg(evt)
458
+ }
459
+ })
460
+ psB.subscribe(topic)
461
+ psB.addEventListener('message', (evt) => {
462
+ if (evt.detail.topic === topic) {
463
+ incMsg(evt)
464
+ }
465
+ })
466
+ psC.subscribe(topic)
467
+ psC.addEventListener('message', (evt) => {
468
+ if (evt.detail.topic === topic) {
469
+ incMsg(evt)
470
+ }
471
+ })
472
+ psD.subscribe(topic)
473
+ psD.addEventListener('message', (evt) => {
474
+ if (evt.detail.topic === topic) {
475
+ incMsg(evt)
476
+ }
477
+ })
478
+ psE.subscribe(topic)
479
+ psE.addEventListener('message', (evt) => {
480
+ if (evt.detail.topic === topic) {
481
+ incMsg(evt)
482
+ }
483
+ })
429
484
 
430
485
  await Promise.all([
431
486
  waitForSubscriptionUpdate(psA, psB),
@@ -435,7 +490,7 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
435
490
  waitForSubscriptionUpdate(psE, psD)
436
491
  ])
437
492
 
438
- void psC.dispatchEvent(new CustomEvent<Uint8Array>('Z', { detail: uint8ArrayFromString('hey from c') }))
493
+ psC.publish('Z', uint8ArrayFromString('hey from c'))
439
494
 
440
495
  function incMsg (evt: CustomEvent<Message>) {
441
496
  const msg = evt.detail
@@ -1,5 +1,5 @@
1
1
  /* eslint max-nested-callbacks: ["error", 6] */
2
- import { expect } from 'aegir/utils/chai.js'
2
+ import { expect } from 'aegir/chai'
3
3
  import sinon from 'sinon'
4
4
  import pDefer from 'p-defer'
5
5
  import pWaitFor from 'p-wait-for'
@@ -7,7 +7,6 @@ import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
7
7
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
8
8
  import { connectPeers, mockRegistrar } from '../mocks/registrar.js'
9
9
  import { createEd25519PeerId } from '@libp2p/peer-id-factory'
10
- import { CustomEvent } from '@libp2p/interfaces'
11
10
  import { waitForSubscriptionUpdate } from './utils.js'
12
11
  import type { TestSetup } from '../index.js'
13
12
  import type { Message } from '@libp2p/interfaces/pubsub'
@@ -89,7 +88,7 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
89
88
  it('Subscribe to a topic in nodeA', async () => {
90
89
  const defer = pDefer()
91
90
 
92
- psB.addEventListener('pubsub:subscription-change', (evt) => {
91
+ psB.addEventListener('subscription-change', (evt) => {
93
92
  const { peerId: changedPeerId, subscriptions: changedSubs } = evt.detail
94
93
  expect(psA.getTopics()).to.deep.equal([topic])
95
94
  expect(psB.getPeers()).to.have.lengthOf(1)
@@ -110,25 +109,26 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
110
109
  it('Publish to a topic in nodeA', async () => {
111
110
  const defer = pDefer()
112
111
 
113
- psA.addEventListener(topic, (evt) => {
114
- const msg = evt.detail
115
- expect(uint8ArrayToString(msg.data)).to.equal('hey')
116
- psB.removeEventListener(topic, shouldNotHappen)
117
- defer.resolve()
112
+ psA.addEventListener('message', (evt) => {
113
+ if (evt.detail.topic === topic) {
114
+ const msg = evt.detail
115
+ expect(uint8ArrayToString(msg.data)).to.equal('hey')
116
+ psB.removeEventListener('message', shouldNotHappen)
117
+ defer.resolve()
118
+ }
118
119
  }, {
119
120
  once: true
120
121
  })
121
122
 
122
- psB.addEventListener(topic, shouldNotHappen, {
123
- once: true
124
- })
123
+ psA.subscribe(topic)
124
+ psB.subscribe(topic)
125
125
 
126
126
  await Promise.all([
127
127
  waitForSubscriptionUpdate(psA, psB),
128
128
  waitForSubscriptionUpdate(psB, psA)
129
129
  ])
130
130
 
131
- void psA.dispatchEvent(new CustomEvent<Uint8Array>(topic, { detail: uint8ArrayFromString('hey') }))
131
+ psA.publish(topic, uint8ArrayFromString('hey'))
132
132
 
133
133
  return await defer.promise
134
134
  })
@@ -136,16 +136,24 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
136
136
  it('Publish to a topic in nodeB', async () => {
137
137
  const defer = pDefer()
138
138
 
139
- psA.addEventListener(topic, (evt) => {
139
+ psA.addEventListener('message', (evt) => {
140
+ if (evt.detail.topic !== topic) {
141
+ return
142
+ }
143
+
140
144
  const msg = evt.detail
141
- psA.addEventListener(topic, shouldNotHappen, {
145
+ psA.addEventListener('message', (evt) => {
146
+ if (evt.detail.topic === topic) {
147
+ shouldNotHappen()
148
+ }
149
+ }, {
142
150
  once: true
143
151
  })
144
152
  expect(uint8ArrayToString(msg.data)).to.equal('banana')
145
153
 
146
154
  setTimeout(() => {
147
- psA.removeEventListener(topic, shouldNotHappen)
148
- psB.removeEventListener(topic, shouldNotHappen)
155
+ psA.removeEventListener('message')
156
+ psB.removeEventListener('message')
149
157
 
150
158
  defer.resolve()
151
159
  }, 100)
@@ -153,16 +161,17 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
153
161
  once: true
154
162
  })
155
163
 
156
- psB.addEventListener(topic, shouldNotHappen, {
157
- once: true
158
- })
164
+ psB.addEventListener('message', shouldNotHappen)
165
+
166
+ psA.subscribe(topic)
167
+ psB.subscribe(topic)
159
168
 
160
169
  await Promise.all([
161
170
  waitForSubscriptionUpdate(psA, psB),
162
171
  waitForSubscriptionUpdate(psB, psA)
163
172
  ])
164
173
 
165
- void psB.dispatchEvent(new CustomEvent<Uint8Array>(topic, { detail: uint8ArrayFromString('banana') }))
174
+ psB.publish(topic, uint8ArrayFromString('banana'))
166
175
 
167
176
  return await defer.promise
168
177
  })
@@ -171,10 +180,8 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
171
180
  const defer = pDefer()
172
181
  let counter = 0
173
182
 
174
- psB.addEventListener(topic, shouldNotHappen, {
175
- once: true
176
- })
177
- psA.addEventListener(topic, receivedMsg)
183
+ psB.addEventListener('message', shouldNotHappen)
184
+ psA.addEventListener('message', receivedMsg)
178
185
 
179
186
  function receivedMsg (evt: CustomEvent<Message>) {
180
187
  const msg = evt.detail
@@ -184,19 +191,22 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
184
191
  expect(msg.topic).to.be.equal(topic)
185
192
 
186
193
  if (++counter === 10) {
187
- psA.removeEventListener(topic, receivedMsg)
188
- psB.removeEventListener(topic, shouldNotHappen)
194
+ psA.removeEventListener('message', receivedMsg)
195
+ psB.removeEventListener('message', shouldNotHappen)
189
196
 
190
197
  defer.resolve()
191
198
  }
192
199
  }
193
200
 
201
+ psA.subscribe(topic)
202
+ psB.subscribe(topic)
203
+
194
204
  await Promise.all([
195
205
  waitForSubscriptionUpdate(psA, psB),
196
206
  waitForSubscriptionUpdate(psB, psA)
197
207
  ])
198
208
 
199
- Array.from({ length: 10 }, (_, i) => psB.dispatchEvent(new CustomEvent<Uint8Array>(topic, { detail: uint8ArrayFromString('banana') })))
209
+ Array.from({ length: 10 }, (_, i) => psB.publish(topic, uint8ArrayFromString('banana')))
200
210
 
201
211
  return await defer.promise
202
212
  })
@@ -205,7 +215,7 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
205
215
  const defer = pDefer()
206
216
  let callCount = 0
207
217
 
208
- psB.addEventListener('pubsub:subscription-change', (evt) => {
218
+ psB.addEventListener('subscription-change', (evt) => {
209
219
  callCount++
210
220
 
211
221
  if (callCount === 1) {
@@ -239,33 +249,5 @@ export default (common: TestSetup<PubSubBaseProtocol, PubSubArgs>) => {
239
249
 
240
250
  return await defer.promise
241
251
  })
242
-
243
- it.skip('Publish to a topic:Z in nodeA nodeB', async () => {
244
- const defer = pDefer()
245
- const topic = 'Z'
246
-
247
- psA.addEventListener(topic, shouldNotHappen, {
248
- once: true
249
- })
250
- psB.addEventListener(topic, shouldNotHappen, {
251
- once: true
252
- })
253
-
254
- await Promise.all([
255
- waitForSubscriptionUpdate(psA, psB),
256
- waitForSubscriptionUpdate(psB, psA)
257
- ])
258
-
259
- setTimeout(() => {
260
- psA.removeEventListener(topic, shouldNotHappen)
261
- psB.removeEventListener(topic, shouldNotHappen)
262
- defer.resolve()
263
- }, 100)
264
-
265
- void psB.dispatchEvent(new CustomEvent<Uint8Array>(topic, { detail: uint8ArrayFromString('banana') }))
266
- void psA.dispatchEvent(new CustomEvent<Uint8Array>(topic, { detail: uint8ArrayFromString('banana') }))
267
-
268
- return await defer.promise
269
- })
270
252
  })
271
253
  }
@@ -5,7 +5,7 @@ import type { PubSubBaseProtocol } from '@libp2p/pubsub'
5
5
 
6
6
  export async function waitForSubscriptionUpdate (a: PubSubBaseProtocol, b: PubSubBaseProtocol) {
7
7
  await pWaitFor(async () => {
8
- const event = await pEvent<'pubsub:subscription-change', CustomEvent<SubscriptionChangeData>>(a, 'pubsub:subscription-change')
8
+ const event = await pEvent<'subscription-change', CustomEvent<SubscriptionChangeData>>(a, 'subscription-change')
9
9
 
10
10
  return event.detail.peerId.equals(b.components.getPeerId())
11
11
  })
@@ -1,4 +1,4 @@
1
- import { expect } from 'aegir/utils/chai.js'
1
+ import { expect } from 'aegir/chai'
2
2
  import type { TestSetup } from '../index.js'
3
3
  import type { Record } from '@libp2p/interfaces/record'
4
4
 
@@ -1,4 +1,4 @@
1
- import { expect } from 'aegir/utils/chai.js'
1
+ import { expect } from 'aegir/chai'
2
2
  import { duplexPair } from 'it-pair/duplex'
3
3
  import { pipe } from 'it-pipe'
4
4
  import drain from 'it-drain'
@@ -4,7 +4,7 @@ import { duplexPair } from 'it-pair/duplex'
4
4
  import { abortableSource } from 'abortable-iterator'
5
5
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
6
6
  import drain from 'it-drain'
7
- import { expect } from 'aegir/utils/chai.js'
7
+ import { expect } from 'aegir/chai'
8
8
  import delay from 'delay'
9
9
  import type { TestSetup } from '../index.js'
10
10
  import type { StreamMuxerFactory } from '@libp2p/interfaces/stream-muxer'
@@ -1,4 +1,4 @@
1
- import { expect } from 'aegir/utils/chai.js'
1
+ import { expect } from 'aegir/chai'
2
2
  import { duplexPair } from 'it-pair/duplex'
3
3
  import { pipe } from 'it-pipe'
4
4
  import pLimit from 'p-limit'
@@ -1,4 +1,4 @@
1
- import { expect } from 'aegir/utils/chai.js'
1
+ import { expect } from 'aegir/chai'
2
2
  import sinon from 'sinon'
3
3
  import type { TestSetup } from '../index.js'
4
4
  import type { Topology } from '@libp2p/interfaces/topology'
@@ -1,4 +1,4 @@
1
- import { expect } from 'aegir/utils/chai.js'
1
+ import { expect } from 'aegir/chai'
2
2
  import { isValidTick } from '../utils/is-valid-tick.js'
3
3
  import { mockUpgrader } from '../mocks/upgrader.js'
4
4
  import { mockRegistrar } from '../mocks/registrar.js'
@@ -1,4 +1,4 @@
1
- import { expect } from 'aegir/utils/chai.js'
1
+ import { expect } from 'aegir/chai'
2
2
  import type { TestSetup } from '../index.js'
3
3
  import type { Transport } from '@libp2p/interfaces/transport'
4
4
  import type { TransportTestFixtures } from './index.js'
@@ -1,5 +1,5 @@
1
1
  /* eslint max-nested-callbacks: ["error", 8] */
2
- import { expect } from 'aegir/utils/chai.js'
2
+ import { expect } from 'aegir/chai'
3
3
  import sinon from 'sinon'
4
4
  import pWaitFor from 'p-wait-for'
5
5
  import { pipe } from 'it-pipe'