Skip to content

Commit

Permalink
fix: Provider openrpc response and error methods have a wrapper object
Browse files Browse the repository at this point in the history
  • Loading branch information
kpears201 committed Nov 8, 2023
1 parent 4e644b2 commit 43a735e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions test/suite/simple.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 43a735e

Please sign in to comment.