mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-24 17:51:51 +02:00
25 lines
585 B
JavaScript
25 lines
585 B
JavaScript
const chai = require('chai')
|
|
|
|
/*
|
|
* Chai configuration
|
|
*/
|
|
|
|
// add chai.should()
|
|
chai.should()
|
|
|
|
// Load sinon-chai assertions so expect(stubFn).to.have.been.calledWith('abc')
|
|
// has a nicer failure messages
|
|
chai.use(require('sinon-chai'))
|
|
|
|
// Load promise support for chai
|
|
chai.use(require('chai-as-promised'))
|
|
|
|
// Do not truncate assertion errors
|
|
chai.config.truncateThreshold = 0
|
|
|
|
// add support for mongoose in sinon
|
|
require('sinon-mongoose')
|
|
|
|
// ensure every ObjectId has the id string as a property for correct comparisons
|
|
require('mongodb-legacy').ObjectId.cacheHexString = true
|