We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 872f53e commit fe46aa5Copy full SHA for fe46aa5
test/is-pub-sub.spec.ts
@@ -0,0 +1,22 @@
1
+import { stop, isPubSub } from '@libp2p/interface'
2
+import { mockNetwork } from '@libp2p/interface-compliance-tests/mocks'
3
+import { expect } from 'aegir/chai'
4
+import { createComponents, type GossipSubAndComponents } from './utils/create-pubsub.js'
5
+
6
+describe('is-pub-sub', () => {
7
+ let node: GossipSubAndComponents
8
9
+ before(async () => {
10
+ mockNetwork.reset()
11
+ node = await createComponents({})
12
+ })
13
14
+ after(async () => {
15
+ await stop(node.pubsub, ...Object.entries(node.components))
16
17
18
19
+ it('should be a pub-sub node', () => {
20
+ expect(isPubSub(node.pubsub)).to.be.true()
21
22
+})
0 commit comments