overleaf/services/clsi/test/setup.js
Eric Mc Sween 9f2d219102 Add a global test setup file
Set up generally useful stuff:

* chai.should()
* logger stubs
* globals in SandboxedModule, including Buffer and process, which are
  now required in Node 12
2021-03-12 16:27:33 -05:00

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 }
})