mirror of https://github.com/waku-org/js-waku.git
fix(test): check messages on custom pubsub topic
This commit is contained in:
parent
4a193e49e0
commit
d18a5152ef
|
@ -90,7 +90,7 @@ describe("Waku Light Push [node only]", () => {
|
|||
dbg("Waiting for message to show in nwaku");
|
||||
while (msgs.length === 0) {
|
||||
await delay(200);
|
||||
msgs = await nwaku.messages();
|
||||
msgs = await nwaku.messages(customPubSubTopic);
|
||||
}
|
||||
|
||||
expect(msgs[0].contentTopic).to.equal(message.contentTopic);
|
||||
|
|
|
@ -217,7 +217,7 @@ export class Nwaku {
|
|||
]);
|
||||
}
|
||||
|
||||
async messages(): Promise<WakuMessage[]> {
|
||||
async messages(pubsubTopic?: string): Promise<WakuMessage[]> {
|
||||
this.checkProcess();
|
||||
|
||||
const isDefined = (msg: WakuMessage | undefined): msg is WakuMessage => {
|
||||
|
@ -226,7 +226,7 @@ export class Nwaku {
|
|||
|
||||
const protoMsgs = await this.rpcCall<proto.WakuMessage[]>(
|
||||
"get_waku_v2_relay_v1_messages",
|
||||
[DefaultPubSubTopic]
|
||||
[pubsubTopic ?? DefaultPubSubTopic]
|
||||
);
|
||||
|
||||
const msgs = await Promise.all(
|
||||
|
|
Loading…
Reference in New Issue