mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
9babc70df7
fix for chai object id tests GitOrigin-RevId: 98123dbc930c6ee57be3a118177426120482c5f4
13 lines
366 B
JavaScript
13 lines
366 B
JavaScript
import chai from 'chai'
|
|
import sinonChai from 'sinon-chai'
|
|
import chaiAsPromised from 'chai-as-promised'
|
|
import mongodb from 'mongodb-legacy'
|
|
const { ObjectId } = mongodb
|
|
|
|
// ensure every ObjectId has the id string as a property for correct comparisons
|
|
ObjectId.cacheHexString = true
|
|
|
|
// Chai configuration
|
|
chai.should()
|
|
chai.use(sinonChai)
|
|
chai.use(chaiAsPromised)
|