Merge pull request #17362 from overleaf/bg-chai-object-id-tests

fix for chai object id tests

GitOrigin-RevId: 98123dbc930c6ee57be3a118177426120482c5f4
This commit is contained in:
Brian Gough
2024-07-15 12:10:48 +01:00
committed by Copybot
parent 3083d8082f
commit 9babc70df7
24 changed files with 85 additions and 499 deletions

View File

@@ -0,0 +1,3 @@
{
"require": "test/setup.js"
}

View File

@@ -0,0 +1,9 @@
import chai from 'chai'
import chaiAsPromised from 'chai-as-promised'
import { ObjectId } from 'mongodb'
// ensure every ObjectId has the id string as a property for correct comparisons
ObjectId.cacheHexString = true
chai.should()
chai.use(chaiAsPromised)