From 43a735eb86c1803f5e9156a2f8fab31ce7cdd020 Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Tue, 7 Nov 2023 22:22:41 -0800 Subject: [PATCH] fix: Provider openrpc response and error methods have a wrapper object --- test/suite/simple.test.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/suite/simple.test.js b/test/suite/simple.test.js index 971bc48e..c969afce 100644 --- a/test/suite/simple.test.js +++ b/test/suite/simple.test.js @@ -19,21 +19,17 @@ import { Simple } from '../../build/sdk/javascript/src/sdk.mjs' import { expect } from '@jest/globals'; -let state = { - spy: null, - responder: null -} class TransportSpy { constructor(spy) { - state.spy = spy + this.spy = spy + this.responder = null } async send(msg) { let parsed = JSON.parse(msg) - console.log(state.spy) - state.spy(parsed) + this.spy(parsed) this.responder(JSON.stringify({ jsonrpc: '2.0', id: parsed.id,