Skip to content

Commit 478ad3e

Browse files
committed
test: fix builtOptions symbol
1 parent bcafcd9 commit 478ad3e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/integration/crud/maxTimeMS.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ describe('MaxTimeMS', function () {
3030
const col = client.db().collection('max_time_ms');
3131
await col.insertMany([{ agg_pipe: 1 }], { writeConcern: { w: 1 } });
3232
const cursor = col.find({ $where: 'sleep(100) || true' }).maxTimeMS(50);
33-
const kBuiltOptions = getSymbolFrom(cursor, 'builtOptions');
34-
expect(cursor[kBuiltOptions]).to.have.property('maxTimeMS', 50);
33+
// @ts-expect-error: findOptions are private
34+
expect(cursor.findOptions).to.have.property('maxTimeMS', 50);
3535

3636
const error = await cursor.count().catch(error => error);
3737
expect(error).to.be.instanceOf(MongoServerError);
@@ -44,8 +44,8 @@ describe('MaxTimeMS', function () {
4444
const col = client.db().collection('max_time_ms');
4545
await col.insertMany([{ agg_pipe: 1 }], { writeConcern: { w: 1 } });
4646
const cursor = col.find({ $where: 'sleep(100) || true' }).maxTimeMS(50);
47-
const kBuiltOptions = getSymbolFrom(cursor, 'builtOptions');
48-
expect(cursor[kBuiltOptions]).to.have.property('maxTimeMS', 50);
47+
// @ts-expect-error: findOptions are private
48+
expect(cursor.findOptions).to.have.property('maxTimeMS', 50);
4949

5050
const error = await cursor.toArray().catch(error => error);
5151
expect(error).to.be.instanceOf(MongoServerError);

0 commit comments

Comments
 (0)