Skip to content

Commit 0728326

Browse files
committed
pr feedback
1 parent 6644334 commit 0728326

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/integration/change-streams/change_streams.prose.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'chai';
2-
import { once } from 'events';
2+
import { on, once } from 'events';
33
import * as sinon from 'sinon';
44
import { setTimeout } from 'timers';
55

@@ -652,9 +652,11 @@ describe('Change Stream prose tests', function () {
652652
});
653653

654654
await once(changeStream.cursor, 'init');
655+
const changes = on(changeStream, 'change');
655656
await coll.insertOne({ x: 2 }, { writeConcern: { w: 'majority', j: true } });
657+
await changes.next();
656658
await coll.insertOne({ x: 3 }, { writeConcern: { w: 'majority', j: true } });
657-
await once(changeStream, 'change');
659+
await changes.next();
658660

659661
expect(events).to.be.an('array').with.lengthOf(3);
660662
expect(events[0]).to.equal('error');

0 commit comments

Comments
 (0)