2021-03-12 21:18:36 +00:00
|
|
|
const chai = require('chai')
|
2021-09-07 12:57:47 +00:00
|
|
|
const sinonChai = require('sinon-chai')
|
2022-07-07 12:27:20 +00:00
|
|
|
const chaiAsPromised = require('chai-as-promised')
|
2021-03-12 21:18:36 +00:00
|
|
|
const SandboxedModule = require('sandboxed-module')
|
|
|
|
|
2021-09-07 12:57:47 +00:00
|
|
|
// Setup chai
|
2021-03-12 21:18:36 +00:00
|
|
|
chai.should()
|
2021-09-07 12:57:47 +00:00
|
|
|
chai.use(sinonChai)
|
2022-07-07 12:27:20 +00:00
|
|
|
chai.use(chaiAsPromised)
|
2021-03-12 21:18:36 +00:00
|
|
|
|
|
|
|
// Global SandboxedModule settings
|
|
|
|
SandboxedModule.configure({
|
|
|
|
requires: {
|
2022-03-01 15:09:36 +00:00
|
|
|
'@overleaf/logger': {
|
2021-09-07 12:57:47 +00:00
|
|
|
debug() {},
|
2021-03-12 21:18:36 +00:00
|
|
|
log() {},
|
|
|
|
info() {},
|
|
|
|
warn() {},
|
|
|
|
error() {},
|
2021-07-13 11:04:48 +00:00
|
|
|
err() {},
|
|
|
|
},
|
2021-03-12 21:18:36 +00:00
|
|
|
},
|
2021-10-06 08:11:59 +00:00
|
|
|
globals: { Buffer, console, process, URL },
|
2021-03-12 21:18:36 +00:00
|
|
|
})
|