Skip to content

Commit 54c8af6

Browse files
committed
test: fix assertion for standalone
1 parent 0a74415 commit 54c8af6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/integration/connection-monitoring-and-pooling/rtt_pinger.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)