11import { expect } from 'chai' ;
22
33import { MongoBulkWriteError , type MongoClient , MongoServerError } from '../../../src' ;
4- import { assert as test , setupDatabase } from '../shared' ;
4+ import { assert as test , ignoreNsNotFound , setupDatabase } from '../shared' ;
55
66describe . 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