We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e230bd commit d222f73Copy full SHA for d222f73
src/index.spec.ts
@@ -38,16 +38,15 @@ describe("json-rpc-e2e", () => {
38
});
39
40
it(`should return an error and check error data from JSONRPCClient call`, async () => {
41
- const errorObj = {
42
- message: "RPC EXCEPTION",
43
- code: 403,
44
- data: {
+ const expectedCodedException = expect.objectContaining(
+ new CodedRpcException("RPC EXCEPTION", 403, {
45
fromService: "Test Service",
46
params: { data: "hi" }
47
- }
48
- };
+ })
+ );
+
49
const resp = service.testError({ data: "hi" });
50
- return expect(resp).rejects.toThrowError();
+ return expect(resp).rejects.toThrowError(expectedCodedException);
51
52
53
afterAll(async () => {
0 commit comments