Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
danisharora099 committed Jul 15, 2023
1 parent ac2e900 commit bd5c617
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/tests/tests/peer_exchange.node.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,18 @@ describe("Peer Exchange", () => {
const nwaku2Ma = await nwaku2.getMultiaddrWithId();

waku = await createLightNode();

await new Promise<void>((resolve) => {
waku.libp2p.addEventListener("peer:identify", (evt) => {
if (evt.detail.protocols.includes(PeerExchangeCodec)) {
resolve();
}
});
});

await waku.start();
await waku.libp2p.dialProtocol(nwaku2Ma, PeerExchangeCodec);

// await new Promise<void>((resolve) => {
// waku.libp2p.addEventListener("peer:identify", (evt) => {
// if (evt.detail.protocols.includes(PeerExchangeCodec)) {
// resolve();
// }
// });
// });

const components = waku.libp2p.components as unknown as Libp2pComponents;
const peerExchange = new WakuPeerExchange(components);

Expand Down

0 comments on commit bd5c617

Please sign in to comment.