test: enhance error handling in RPC disconnected test
This commit is contained in:
@@ -33,8 +33,11 @@ describe('Rpc disconnected test', () => {
|
||||
errorCode: RPCErrorCode.CONNECTION_DISCONNECTED
|
||||
})
|
||||
);
|
||||
await expect(callPromise).rejects.toBeInstanceOf(RPCError);
|
||||
await expect(callPromise).rejects
|
||||
.toHaveProperty('errorCode', RPCErrorCode.CONNECTION_DISCONNECTED);
|
||||
await expect(callPromise).rejects.toMatchObject(
|
||||
expect.objectContaining({
|
||||
constructor: RPCError,
|
||||
errorCode: RPCErrorCode.CONNECTION_DISCONNECTED
|
||||
})
|
||||
);
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user