overleaf/services/spelling/test/setup.js
Eric Mc Sween 11261a0cb9 Add global test setup
Configure SanboxedModule and chai in a central place. Configure
SandboxedModule globals that are needed in Node 12.
2021-03-19 16:04:30 -04:00

21 lines
400 B
JavaScript

const chai = require('chai')
const SandboxedModule = require('sandboxed-module')
// Chai configuration
chai.should()
// SandboxedModule configuration
SandboxedModule.configure({
requires: {
'logger-sharelatex': {
debug() {},
log() {},
info() {},
warn() {},
err() {},
error() {},
fatal() {}
}
},
globals: { Buffer, JSON, console, process }
})