mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Add global test setup
Configure chai and SandboxedModule in a central place and add SandboxedModule globals that are required in Node 12.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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 }
|
||||
})
|
||||
Reference in New Issue
Block a user