mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 16:30:48 +00:00
9f2d219102
Set up generally useful stuff: * chai.should() * logger stubs * globals in SandboxedModule, including Buffer and process, which are now required in Node 12
19 lines
364 B
JavaScript
19 lines
364 B
JavaScript
const chai = require('chai')
|
|
const SandboxedModule = require('sandboxed-module')
|
|
|
|
// Setup should interface
|
|
chai.should()
|
|
|
|
// Global SandboxedModule settings
|
|
SandboxedModule.configure({
|
|
requires: {
|
|
'logger-sharelatex': {
|
|
log() {},
|
|
info() {},
|
|
warn() {},
|
|
error() {},
|
|
err() {}
|
|
}
|
|
},
|
|
globals: { Buffer, console, process }
|
|
})
|