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', () => {
42
42
43
43
await sleep ( 11 ) ; // allow for another ping after spies have been made
44
44
45
- expect ( spies ) . to . have . length . above ( 1 ) ;
45
+ expect ( spies ) . to . have . lengthOf . at . least ( 1 ) ;
46
46
for ( const spy of spies ) {
47
47
expect ( spy ) . to . have . been . calledWith ( sinon . match . any , { hello : 1 } , sinon . match . any ) ;
48
48
}
@@ -70,14 +70,14 @@ describe('class RTTPinger', () => {
70
70
71
71
await sleep ( 11 ) ; // rttPinger connection creation
72
72
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' ) ) ;
77
77
78
78
await sleep ( 11 ) ; // allow for another ping after spies have been made
79
79
80
- expect ( destroySpies ) . to . have . length . above ( 1 ) ;
80
+ expect ( spies ) . to . have . lengthOf . at . least ( 1 ) ;
81
81
for ( const spy of spies ) {
82
82
expect ( spy ) . to . have . been . called ;
83
83
}
You can’t perform that action at this time.
0 commit comments