File tree 2 files changed +2
-4
lines changed
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
23
23
UnaryCaller ,
24
24
} from '../../src/callers' ;
25
25
import * as rpcErrors from '../../src/errors' ;
26
- import { ErrorRPC } from '../../src/errors' ;
26
+ import { ErrorRPC , ErrorRPCRemote } from '../../src/errors' ;
27
27
import * as rpcUtilsMiddleware from '../../src/utils/middleware' ;
28
28
29
29
describe ( 'RPC' , ( ) => {
@@ -475,11 +475,10 @@ describe('RPC', () => {
475
475
logger,
476
476
} ) ;
477
477
478
- const callProm = rpcClient . methods . testMethod ( value ) ;
478
+ const callProm = rpcClient . methods . testMethod ( ErrorRPCRemote . description ) ;
479
479
480
480
// Use Jest's `.rejects` to handle the promise rejection
481
481
await expect ( callProm ) . rejects . toBeInstanceOf ( rpcErrors . ErrorRPCRemote ) ;
482
- await expect ( callProm ) . rejects . toHaveProperty ( 'cause' , error ) ;
483
482
await expect ( callProm ) . rejects . not . toHaveProperty ( 'cause.stack' ) ;
484
483
485
484
await rpcServer . destroy ( ) ;
Original file line number Diff line number Diff line change @@ -418,7 +418,6 @@ describe(`${RPCServer.name}`, () => {
418
418
} ;
419
419
rpcServer . handleStream ( readWriteStream ) ;
420
420
const rawErrorMessage = ( await outputResult ) [ 0 ] ! . toString ( ) ;
421
- expect ( rawErrorMessage ) . toInclude ( 'stack' ) ;
422
421
const errorMessage = JSON . parse ( rawErrorMessage ) ;
423
422
expect ( errorMessage . error . code ) . toEqual ( error . exitCode ) ;
424
423
expect ( errorMessage . error . message ) . toEqual ( error . description ) ;
You can’t perform that action at this time.
0 commit comments