From 21e5e6d38017d74f8712a3bdb2a86f4df5dfb76c Mon Sep 17 00:00:00 2001 From: Matias Volpe Date: Tue, 28 Feb 2023 13:41:19 -0300 Subject: [PATCH] fix: invalid chain spec smoldot test --- rpc/smoldot.test.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/rpc/smoldot.test.ts b/rpc/smoldot.test.ts index ee54c8f7a..0f18b061a 100644 --- a/rpc/smoldot.test.ts +++ b/rpc/smoldot.test.ts @@ -59,9 +59,18 @@ Deno.test({ assertEquals((await message.params?.result as any).event, "initialized") }) - await t.step("invalid chain spec", async () => { - await assertRejects(async () => new SmoldotConnection({ relayChainSpec: "" }), AddChainError) - }) + await t.step( + "invalid chain spec", + async () => { + await assertRejects( + async () => { + const connection = new SmoldotConnection({ relayChainSpec: "" }) + return connection.smoldotChainPending + }, + AddChainError, + ) + }, + ) }, })