mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
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:
@@ -4,6 +4,9 @@ const SandboxedModule = require('sandboxed-module')
|
||||
// Chai configuration
|
||||
chai.should()
|
||||
|
||||
// ensure every ObjectId has the id string as a property for correct comparisons
|
||||
require('mongodb-legacy').ObjectId.cacheHexString = true
|
||||
|
||||
// SandboxedModule configuration
|
||||
SandboxedModule.configure({
|
||||
requires: {
|
||||
@@ -16,6 +19,7 @@ SandboxedModule.configure({
|
||||
error() {},
|
||||
fatal() {},
|
||||
},
|
||||
'mongodb-legacy': require('mongodb-legacy'), // for ObjectId comparisons
|
||||
},
|
||||
globals: { Buffer, JSON, console, process },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user