Skip to content

Commit 6009384

Browse files
testing fix 2
1 parent 5998169 commit 6009384

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/mongo_types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export type UpdateFilter<TSchema> = {
284284
$currentDate?: OnlyFieldsOfType<
285285
TSchema,
286286
Date | Timestamp | true,
287-
{ $type: 'date' | 'timestamp' }
287+
true | { $type: 'date' | 'timestamp' }
288288
>;
289289
$inc?: OnlyFieldsOfType<TSchema, NumericType | undefined>;
290290
$min?: MatchKeysAndValues<TSchema>;
@@ -588,7 +588,7 @@ export type StrictFilter<TSchema> =
588588
export type StrictUpdateFilter<TSchema> = {
589589
$currentDate?: OnlyFieldsOfType<
590590
TSchema,
591-
true | Date | Timestamp,
591+
Date | Timestamp,
592592
true | { $type: 'date' | 'timestamp' }
593593
>;
594594
$inc?: OnlyFieldsOfType<TSchema, NumericType | undefined>;

test/integration/crud/find_and_modify.test.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import { expect } from 'chai';
22

3-
import { type Collection, type CommandStartedEvent, type Db, MongoServerError, ObjectId } from '../../mongodb';
3+
import {
4+
type Collection,
5+
type CommandStartedEvent,
6+
type Db,
7+
MongoServerError,
8+
ObjectId
9+
} from '../../mongodb';
410
import { setupDatabase } from '../shared';
511

612
describe('Collection (#findOneAnd...)', function () {
@@ -325,7 +331,7 @@ describe('Collection (#findOneAnd...)', function () {
325331
});
326332
});
327333

328-
describe.only('update filter', function () {
334+
describe('update filter', function () {
329335
context('when $currentDate is provided', function () {
330336
let client;
331337
let db: Db;
@@ -345,7 +351,11 @@ describe('Collection (#findOneAnd...)', function () {
345351
});
346352

347353
it(`should support fields with value 'true'`, async function () {
348-
await collection.findOneAndUpdate({}, { $set: { a: 1 }, $currentDate: { lastModified: true } }, { writeConcern: { w: 1 } });
354+
await collection.findOneAndUpdate(
355+
{},
356+
{ $set: { a: 1 }, $currentDate: { lastModified: true } },
357+
{ writeConcern: { w: 1 } }
358+
);
349359
});
350360
});
351361
});

0 commit comments

Comments
 (0)