Skip to content

Commit 562b3ce

Browse files
committed
chore: add option
1 parent 425f2ff commit 562b3ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/integration/crud/crud_api.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,11 @@ describe('CRUD API', function () {
959959

960960
it('throws an error', async function () {
961961
const error = await collection
962-
.findOneAndUpdate({ a: 1 }, { $set: undefined, $unset: undefined })
962+
.findOneAndUpdate(
963+
{ a: 1 },
964+
{ $set: undefined, $unset: undefined },
965+
{ ignoreUndefined: true }
966+
)
963967
.catch(error => error);
964968
expect(error.message).to.include('All atomic operators provided have undefined values.');
965969
});

0 commit comments

Comments
 (0)