From c761a7489eb89e782c58b480dd8f592933a22e9a Mon Sep 17 00:00:00 2001 From: Harry Solovay Date: Wed, 12 Oct 2022 16:45:51 -0400 Subject: [PATCH] chore: fix failing RPC test (#293) --- rpc/providers/proxy.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rpc/providers/proxy.test.ts b/rpc/providers/proxy.test.ts index 4a4c74e4b..cb24a2674 100644 --- a/rpc/providers/proxy.test.ts +++ b/rpc/providers/proxy.test.ts @@ -1,5 +1,5 @@ import { assert } from "../../deps/std/testing/asserts.ts"; -import { polkadot } from "../../known/mod.ts"; +import { config as testConfig } from "../../test_util/mod.ts"; import * as U from "../../util/mod.ts"; import * as msg from "../messages.ts"; import { proxyClient } from "./proxy.ts"; @@ -9,7 +9,8 @@ Deno.test({ sanitizeResources: false, sanitizeOps: false, async fn(t) { - const client = U.throwIfError(await proxyClient(polkadot)); + const config = await testConfig(); + const client = U.throwIfError(await proxyClient(config)); await t.step("call", async () => { const raw = await client.call("state_getMetadata", []); @@ -17,7 +18,7 @@ Deno.test({ }); await t.step("subscribe", async () => { - const result: msg.NotifMessage[] = []; + const result: msg.NotifMessage[] = []; let i = 1; await client.subscribe("chain_subscribeAllHeads", [], (stop) => { return (message) => { @@ -34,5 +35,6 @@ Deno.test({ }); await client.close(); + config.close(); }, });