| 12345678910111213141516171819202122232425262728 |
- const SandboxedModule = require('sandboxed-module')
- const chai = require('chai')
- const sinon = require('sinon')
- chai.use(require('sinon-chai'))
- chai.use(require('chai-as-promised'))
- SandboxedModule.configure({
- requires: {
- '@overleaf/logger': {
- debug() {},
- log() {},
- info() {},
- warn() {},
- error() {},
- err() {},
- },
- '@overleaf/metrics': {
- inc: sinon.stub(),
- count: sinon.stub(),
- histogram: sinon.stub(),
- Timer: class Timer {
- done() {}
- },
- },
- },
- globals: { Buffer, Math, console, process, URL },
- })
|