mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
8fa676082e
[object-persistor] depend on @overleaf/metrics directly GitOrigin-RevId: eb0c07af8101d44def14154abb552bc77254e074
28 lines
592 B
JavaScript
28 lines
592 B
JavaScript
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 },
|
|
})
|