mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 18:03:42 -05:00
6bd5038791
add unit tests for ObjectId comparison with chai and sinon GitOrigin-RevId: e23156f6fd95f37d447f7569a01916c71bf04ede
11 lines
350 B
JavaScript
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
|