File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
2323 UnaryCaller ,
2424} from '../../src/callers' ;
2525import * as rpcErrors from '../../src/errors' ;
26- import { ErrorRPC } from '../../src/errors' ;
26+ import { ErrorRPC , ErrorRPCRemote } from '../../src/errors' ;
2727import * as rpcUtilsMiddleware from '../../src/utils/middleware' ;
2828
2929describe ( 'RPC' , ( ) => {
@@ -475,11 +475,10 @@ describe('RPC', () => {
475475 logger,
476476 } ) ;
477477
478- const callProm = rpcClient . methods . testMethod ( value ) ;
478+ const callProm = rpcClient . methods . testMethod ( ErrorRPCRemote . description ) ;
479479
480480 // Use Jest's `.rejects` to handle the promise rejection
481481 await expect ( callProm ) . rejects . toBeInstanceOf ( rpcErrors . ErrorRPCRemote ) ;
482- await expect ( callProm ) . rejects . toHaveProperty ( 'cause' , error ) ;
483482 await expect ( callProm ) . rejects . not . toHaveProperty ( 'cause.stack' ) ;
484483
485484 await rpcServer . destroy ( ) ;
Original file line number Diff line number Diff line change @@ -418,7 +418,6 @@ describe(`${RPCServer.name}`, () => {
418418 } ;
419419 rpcServer . handleStream ( readWriteStream ) ;
420420 const rawErrorMessage = ( await outputResult ) [ 0 ] ! . toString ( ) ;
421- expect ( rawErrorMessage ) . toInclude ( 'stack' ) ;
422421 const errorMessage = JSON . parse ( rawErrorMessage ) ;
423422 expect ( errorMessage . error . code ) . toEqual ( error . exitCode ) ;
424423 expect ( errorMessage . error . message ) . toEqual ( error . description ) ;
You can’t perform that action at this time.
0 commit comments