2021-03-12 16:18:36 -05:00
|
|
|
const chai = require('chai')
|
2021-09-07 08:57:47 -04:00
|
|
|
const sinonChai = require('sinon-chai')
|
2021-03-12 16:18:36 -05:00
|
|
|
const SandboxedModule = require('sandboxed-module')
|
|
|
|
|
2021-09-07 08:57:47 -04:00
|
|
|
// Setup chai
|
2021-03-12 16:18:36 -05:00
|
|
|
chai.should()
|
2021-09-07 08:57:47 -04:00
|
|
|
chai.use(sinonChai)
|
2021-03-12 16:18:36 -05:00
|
|
|
|
|
|
|
// Global SandboxedModule settings
|
|
|
|
SandboxedModule.configure({
|
|
|
|
requires: {
|
|
|
|
'logger-sharelatex': {
|
2021-09-07 08:57:47 -04:00
|
|
|
debug() {},
|
2021-03-12 16:18:36 -05:00
|
|
|
log() {},
|
|
|
|
info() {},
|
|
|
|
warn() {},
|
|
|
|
error() {},
|
2021-07-13 07:04:48 -04:00
|
|
|
err() {},
|
|
|
|
},
|
2021-03-12 16:18:36 -05:00
|
|
|
},
|
2021-10-06 04:11:59 -04:00
|
|
|
globals: { Buffer, console, process, URL },
|
2021-03-12 16:18:36 -05:00
|
|
|
})
|