overleaf/services/web/test/acceptance/bootstrap.js
Brian Gough 6bd5038791 Merge pull request #17282 from overleaf/bg-object-id-unit-tests-ii
add unit tests for ObjectId comparison with chai and sinon

GitOrigin-RevId: e23156f6fd95f37d447f7569a01916c71bf04ede
2024-02-27 09:03:04 +00:00

11 lines
350 B
JavaScript

const chai = require('chai')
chai.should()
chai.use(require('chai-as-promised'))
chai.use(require('sinon-chai'))
chai.use(require('chai-exclude'))
// Do not truncate assertion errors
chai.config.truncateThreshold = 0
// ensure every ObjectId has the id string as a property for correct comparisons
require('mongodb').ObjectId.cacheHexString = true