Skip to content

Commit d90429d

Browse files
committed
test(NODE-7177): fix types
1 parent 6609744 commit d90429d

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

test/integration/collection-management/collection.test.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { type TestConfiguration } from '../../tools/runner/config';
55
import { type FailCommandFailPoint } from '../../tools/utils';
66
import { setupDatabase } from '../shared';
77

8-
describe.only('Collection', function () {
8+
describe('Collection', function () {
99
let configuration: TestConfiguration;
1010

1111
before(function () {
@@ -189,7 +189,7 @@ describe.only('Collection', function () {
189189

190190
for (const test of updateTests) {
191191
it(test.title, async function () {
192-
const collection = await db.createCollection(test.collectionName);
192+
const collection = await db.createCollection<{ _id: number }>(test.collectionName);
193193
const response = await collection.updateOne(
194194
test.filterObject,
195195
test.updateObject,
@@ -231,9 +231,7 @@ describe.only('Collection', function () {
231231
await db.createCollection(testCollection);
232232

233233
// Index name happens to be the same as collection name
234-
const indexName = await db.createIndex(testCollection, 'collection_124', {
235-
writeConcern: { w: 1 }
236-
});
234+
const indexName = await db.createIndex(testCollection, 'collection_124');
237235

238236
expect(indexName).to.equal('collection_124_1');
239237

@@ -293,10 +291,7 @@ describe.only('Collection', function () {
293291
const collection = await db.createCollection(
294292
'shouldCorrectlyCreateTTLCollectionWithIndexCreateIndex'
295293
);
296-
await collection.createIndex(
297-
{ createdAt: 1 },
298-
{ expireAfterSeconds: 1, writeConcern: { w: 1 } }
299-
);
294+
await collection.createIndex({ createdAt: 1 }, { expireAfterSeconds: 1 });
300295

301296
// Insert a document with a date
302297
await collection.insertOne({ a: 1, createdAt: new Date() }, configuration.writeConcernMax());

0 commit comments

Comments
 (0)