File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
test/integration/connection-monitoring-and-pooling Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ describe('class RTTPinger', () => {
4242
4343 await sleep ( 11 ) ; // allow for another ping after spies have been made
4444
45- expect ( spies ) . to . have . length . above ( 1 ) ;
45+ expect ( spies ) . to . have . lengthOf . at . least ( 1 ) ;
4646 for ( const spy of spies ) {
4747 expect ( spy ) . to . have . been . calledWith ( sinon . match . any , { hello : 1 } , sinon . match . any ) ;
4848 }
@@ -70,14 +70,14 @@ describe('class RTTPinger', () => {
7070
7171 await sleep ( 11 ) ; // rttPinger connection creation
7272
73- const spies = rttPingers . map ( rtt =>
74- sinon . stub ( rtt . connection ! , 'command' ) . yieldsRight ( new Error ( 'any' ) )
75- ) ;
76- const destroySpies = rttPingers . map ( rtt => sinon . spy ( rtt . connection ! , 'destroy' ) ) ;
73+ for ( const rtt of rttPingers )
74+ sinon . stub ( rtt . connection ! , 'command' ) . yieldsRight ( new Error ( 'any' ) ) ;
75+
76+ const spies = rttPingers . map ( rtt => sinon . spy ( rtt . connection ! , 'destroy' ) ) ;
7777
7878 await sleep ( 11 ) ; // allow for another ping after spies have been made
7979
80- expect ( destroySpies ) . to . have . length . above ( 1 ) ;
80+ expect ( spies ) . to . have . lengthOf . at . least ( 1 ) ;
8181 for ( const spy of spies ) {
8282 expect ( spy ) . to . have . been . called ;
8383 }
You can’t perform that action at this time.
0 commit comments