Skip to content

Commit 7d196c7

Browse files
committed
ignore nsNotFound errors
1 parent 8986efb commit 7d196c7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/integration/crud/document_validation.test.ts

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

33
import { MongoBulkWriteError, type MongoClient, MongoServerError } from '../../../src';
4-
import { assert as test, setupDatabase } from '../shared';
4+
import { assert as test, ignoreNsNotFound, setupDatabase } from '../shared';
55

66
describe.only('Document Validation', function () {
77
let client: MongoClient;
@@ -28,7 +28,7 @@ describe.only('Document Validation', function () {
2828
const col = db.collection('createValidationCollection');
2929

3030
// Drop the collection
31-
await col.drop();
31+
await col.drop().catch(ignoreNsNotFound);
3232
// Create a collection with a validator
3333
await db.createCollection('createValidationCollection', {
3434
validator: { a: { $exists: true } }
@@ -56,7 +56,7 @@ describe.only('Document Validation', function () {
5656
const col = db.collection('createValidationCollection');
5757

5858
// Drop the collection
59-
await col.drop();
59+
await col.drop().catch(ignoreNsNotFound);
6060
// Create a collection with a validator
6161
await db.createCollection('createValidationCollection', {
6262
validator: { a: { $exists: true } }
@@ -97,7 +97,7 @@ describe.only('Document Validation', function () {
9797
const col = db.collection('createValidationCollection');
9898

9999
// Drop the collection
100-
await col.drop();
100+
await col.drop().catch(ignoreNsNotFound);
101101
// Create a collection with a validator
102102
await db.createCollection('createValidationCollection', {
103103
validator: { a: { $exists: true } }
@@ -123,7 +123,7 @@ describe.only('Document Validation', function () {
123123
const col = db.collection('createValidationCollection');
124124

125125
// Drop the collection
126-
await col.drop();
126+
await col.drop().catch(ignoreNsNotFound);
127127
// Create a collection with a validator
128128
await db.createCollection('createValidationCollection', {
129129
validator: { a: { $exists: true } }
@@ -176,7 +176,7 @@ describe.only('Document Validation', function () {
176176
const col = db.collection('createValidationCollectionOut');
177177

178178
// Drop the collection
179-
await col.drop();
179+
await col.drop().catch(ignoreNsNotFound);
180180
// Create a collection with a validator
181181
await db.createCollection('createValidationCollectionOut', {
182182
validator: { a: { $exists: true } }

0 commit comments

Comments
 (0)