From 6fa106aa7ff0fe4113de0a31f04448056bfdf298 Mon Sep 17 00:00:00 2001 From: Simon-Pierre Vivier Date: Mon, 25 Sep 2023 18:24:49 -0400 Subject: [PATCH] fix: subscription RPC & added test subscriptions (#1587) Co-authored-by: Sasha <118575614+weboko@users.noreply.github.com> --- packages/tests/src/node/node.ts | 7 +++---- packages/tests/tests/light-push/custom_pubsub.node.spec.ts | 2 ++ packages/tests/tests/light-push/index.spec.ts | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/tests/src/node/node.ts b/packages/tests/src/node/node.ts index c05dec5582..5cd8c85d14 100644 --- a/packages/tests/src/node/node.ts +++ b/packages/tests/src/node/node.ts @@ -210,14 +210,13 @@ export class NimGoNode { } async ensureSubscriptions( - pubsubTopics: [string] = [DefaultPubSubTopic] + pubsubTopics: string[] = [DefaultPubSubTopic] ): Promise { this.checkProcess(); - return this.rpcCall( - "post_waku_v2_relay_v1_subscriptions", + return this.rpcCall("post_waku_v2_relay_v1_subscriptions", [ pubsubTopics - ); + ]); } async sendMessage( diff --git a/packages/tests/tests/light-push/custom_pubsub.node.spec.ts b/packages/tests/tests/light-push/custom_pubsub.node.spec.ts index fa36bad14d..23ee24240c 100644 --- a/packages/tests/tests/light-push/custom_pubsub.node.spec.ts +++ b/packages/tests/tests/light-push/custom_pubsub.node.spec.ts @@ -25,6 +25,8 @@ describe("Waku Light Push [node only] - custom pubsub topic", function () { nwaku, customPubSubTopic ); + + await nwaku.ensureSubscriptions([customPubSubTopic]); }); this.afterEach(async function () { diff --git a/packages/tests/tests/light-push/index.spec.ts b/packages/tests/tests/light-push/index.spec.ts index e43207bd9f..db2e29680b 100644 --- a/packages/tests/tests/light-push/index.spec.ts +++ b/packages/tests/tests/light-push/index.spec.ts @@ -34,6 +34,8 @@ describe("Waku Light Push [node only]", function () { nwaku, DefaultPubSubTopic ); + + await nwaku.ensureSubscriptions(); }); this.afterEach(async function () {