11import { RpcMessageStreamProcessor , RpcMessageStreamProcessorOptions } from '../RpcMessageStreamProcessor' ;
2- import { RpcError , RpcErrorCodes } from '../caller' ;
2+ import { RpcError } from '../caller' ;
33import { of , from , Subject , Observable , Subscriber } from 'rxjs' ;
44import { map , switchMap , take } from 'rxjs/operators' ;
55import { ApiRpcCaller , ApiRpcCallerOptions } from '../caller/ApiRpcCaller' ;
@@ -12,9 +12,9 @@ import {
1212 ResponseErrorMessage ,
1313 ResponseUnsubscribeMessage ,
1414} from '../../messages' ;
15- import { until } from '../../../../__tests__/util ' ;
15+ import { until } from 'thingies ' ;
1616import { RpcValue } from '../../messages/Value' ;
17- import { t } from '../../../.. /json-type' ;
17+ import { t } from 'json-joy/lib /json-type' ;
1818import { Defer } from '../../../util/Defer' ;
1919
2020const setup = (
@@ -728,8 +728,9 @@ describe('pre-call checks', () => {
728728 server . onMessage ( new RequestDataMessage ( 1 , 'test' , val ( { a : '11' } ) ) , { foo : 'bar' } ) ;
729729 await new Promise ( ( r ) => setTimeout ( r , 1 ) ) ;
730730 expect ( send ) . toHaveBeenCalledTimes ( 1 ) ;
731- expect ( send . mock . calls [ 0 ] [ 0 ] [ 0 ] ) . toBeInstanceOf ( ResponseErrorMessage ) ;
732- expect ( send . mock . calls [ 0 ] [ 0 ] [ 0 ] . value . data . message ) . toBe ( 'BUFFER_OVERFLOW' ) ;
731+ const errorValue = send . mock . calls [ 0 ] [ 0 ] [ 0 ] ;
732+ expect ( errorValue ) . toBeInstanceOf ( ResponseErrorMessage ) ;
733+ expect ( errorValue . value . data . message ) . toBe ( 'BUFFER_OVERFLOW' ) ;
733734 } ) ;
734735
735736 test ( 'buffer size can be set to 5 for the whole server' , async ( ) => {
0 commit comments