@@ -49,17 +49,15 @@ describe('#write()', () => {
4949 it ( 'writes instantly' , ( ) => {
5050 const writer = createWriter ( { group : false } ) ;
5151 writer . write ( commands [ 2 ] , 'hello' ) ;
52- expect ( outputStream . write ) . toHaveBeenCalledTimes ( 1 ) ;
53- expect ( outputStream . write ) . toHaveBeenCalledWith ( 'hello' ) ;
52+ expect ( outputStream . write ) . toHaveBeenCalledExactlyOnceWith ( 'hello' ) ;
5453 } ) ;
5554 } ) ;
5655
5756 describe ( 'with group=true' , ( ) => {
5857 it ( 'writes for null commands' , ( ) => {
5958 const writer = createWriter ( { group : true } ) ;
6059 writer . write ( undefined , 'hello' ) ;
61- expect ( outputStream . write ) . toHaveBeenCalledTimes ( 1 ) ;
62- expect ( outputStream . write ) . toHaveBeenCalledWith ( 'hello' ) ;
60+ expect ( outputStream . write ) . toHaveBeenCalledExactlyOnceWith ( 'hello' ) ;
6361 } ) ;
6462
6563 it ( 'does not write instantly for non-active command' , ( ) => {
@@ -72,8 +70,7 @@ describe('#write()', () => {
7270 it ( 'write instantly for active command' , ( ) => {
7371 const writer = createWriter ( { group : true } ) ;
7472 writer . write ( commands [ 0 ] , 'hello' ) ;
75- expect ( outputStream . write ) . toHaveBeenCalledTimes ( 1 ) ;
76- expect ( outputStream . write ) . toHaveBeenCalledWith ( 'hello' ) ;
73+ expect ( outputStream . write ) . toHaveBeenCalledExactlyOnceWith ( 'hello' ) ;
7774 } ) ;
7875
7976 it ( 'does not wait for write from next command to flush' , ( ) => {
@@ -108,8 +105,7 @@ describe('#write()', () => {
108105 closeCommand ( commands [ 2 ] ) ;
109106 expect ( outputStream . write ) . toHaveBeenCalledTimes ( 0 ) ;
110107 closeCommand ( commands [ 0 ] ) ;
111- expect ( outputStream . write ) . toHaveBeenCalledTimes ( 1 ) ;
112- expect ( outputStream . write ) . toHaveBeenCalledWith ( 'hello' ) ;
108+ expect ( outputStream . write ) . toHaveBeenCalledExactlyOnceWith ( 'hello' ) ;
113109 expect ( writer . activeCommandIndex ) . toBe ( 2 ) ;
114110 } ) ;
115111 } ) ;
0 commit comments