Skip to content

Commit 29f5d5e

Browse files
committed
chore: remove promise creation
1 parent 250fe4a commit 29f5d5e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/integration/client-side-operations-timeout/node_csot.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,7 @@ describe('CSOT driver tests', metadata, () => {
10231023

10241024
beforeEach(async function () {
10251025
cs = client.db('db').collection('coll').watch([], { timeoutMS: 120 });
1026-
const changePromise = once(cs, 'change');
1027-
void changePromise.then(undefined, () => null); // need to handled when this rejects with the timeout error
1026+
cs.once('change', () => null);
10281027

10291028
await once(cs.cursor, 'init');
10301029

0 commit comments

Comments
 (0)