mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
[real-time] convert real time to esm GitOrigin-RevId: 7cc530cc977549d3274be42585735e1fd72cad5f
35 lines
624 B
JavaScript
35 lines
624 B
JavaScript
import * as chai from 'chai'
|
|
import sinon from 'sinon'
|
|
import chaiAsPromised from 'chai-as-promised'
|
|
import sinonChai from 'sinon-chai'
|
|
import '../app.js'
|
|
|
|
// Chai configuration
|
|
chai.should()
|
|
chai.use(chaiAsPromised)
|
|
chai.use(sinonChai)
|
|
|
|
// Global stubs
|
|
const sandbox = sinon.createSandbox()
|
|
const stubs = {
|
|
logger: {
|
|
debug: sandbox.stub(),
|
|
log: sandbox.stub(),
|
|
info: sandbox.stub(),
|
|
warn: sandbox.stub(),
|
|
err: sandbox.stub(),
|
|
error: sandbox.stub(),
|
|
},
|
|
}
|
|
|
|
// Mocha hooks
|
|
export const mochaHooks = {
|
|
beforeEach() {
|
|
this.logger = stubs.logger
|
|
},
|
|
|
|
afterEach() {
|
|
sandbox.reset()
|
|
},
|
|
}
|