Skip to content

Commit 953a316

Browse files
fix tests
1 parent e0e2b80 commit 953a316

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

test/integration/node-specific/bson-options/use_bigint_64.test.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,18 @@ describe('useBigInt64 option', function () {
171171
beforeEach(async function () {
172172
client = await this.configuration.newClient().connect();
173173
db = client.db('bsonOptions', { promoteLongs: false, useBigInt64: true });
174+
175+
await db.createCollection('foo');
176+
await db.createCollection('bar');
177+
});
178+
179+
afterEach(async function () {
180+
await db.dropDatabase();
174181
});
175182

176183
it('throws a BSONError', async function () {
177184
const e = await db
178-
.aggregate([])
185+
.listCollections()
179186
.toArray()
180187
.catch(e => e);
181188
expect(e).to.be.instanceOf(BSON.BSONError);
@@ -235,12 +242,19 @@ describe('useBigInt64 option', function () {
235242
describe('when set at DB level', function () {
236243
beforeEach(async function () {
237244
client = await this.configuration.newClient().connect();
238-
db = client.db('bsonOptions', { promoteValues: false, useBigInt64: true });
245+
db = client.db('bsonOptions', { promoteLongs: false, useBigInt64: true });
246+
247+
await db.createCollection('foo');
248+
await db.createCollection('bar');
249+
});
250+
251+
afterEach(async function () {
252+
await db.dropDatabase();
239253
});
240254

241255
it('throws a BSONError', async function () {
242256
const e = await db
243-
.aggregate([])
257+
.listCollections()
244258
.toArray()
245259
.catch(e => e);
246260
expect(e).to.be.instanceOf(BSON.BSONError);

0 commit comments

Comments
 (0)