Skip to content

Commit

Permalink
update a test for rpc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad-Altabba committed Jul 3, 2023
1 parent 5490376 commit 41bb85d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Object {
}
`;

exports[`rpc errors rpc_errors.RpcError test constructor 1`] = `
exports[`rpc errors rpcErrors.RpcError test constructor 1`] = `
Object {
"code": 123,
"error": Object {
Expand All @@ -274,7 +274,7 @@ Object {
}
`;

exports[`rpc errors rpc_errors.RpcError test constructor with custom message 1`] = `
exports[`rpc errors rpcErrors.RpcError test constructor with custom message 1`] = `
Object {
"code": 123,
"error": Object {
Expand Down
7 changes: 3 additions & 4 deletions packages/web3-errors/test/unit/rpc-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ describe('rpc errors', () => {
describe('rpcErrorsMap', () => {
it('child RpcError classes should be also mapped inside `rpcErrorsMap`', () => {
expect(
Object.keys(rpcErrors).filter(
Object.values(rpcErrors).filter(
err =>
err !== 'RpcError' &&
err !== 'rpcErrorsMap' &&
err !== 'EIP1193ProviderRpcError',
(err as any).prototype?.constructor?.prototype instanceof
rpcErrors.RpcError,
),
).toHaveLength(rpcErrors.rpcErrorsMap.size);
});
Expand Down

0 comments on commit 41bb85d

Please sign in to comment.