mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
* [monorepo] record ERROR/FATAL log messages in junit report * [web] put SaaS specific code behind feature flag * [web] use split test cache for getting user assignments The unit tests needed updating as they did not replicate any of the mongo filtering. The acceptance tests cover this logic. * [web] make better use of existing indexes * [web] avoid col-scan in tests of notifications module * [web] remove cleanup of empty feedbacks collection * [web] add assertion for reason of rejected request in launchpad test * [web] add missing indexes * [web] enable mongo notablescan * [web] make emailNotifications tests compatible with notablescan GitOrigin-RevId: b888f2feeb3a0e915f068ae1c4ea23ec17821221
22 lines
608 B
JavaScript
22 lines
608 B
JavaScript
import { createServer } from '../../../../app/js/server.js'
|
|
import { promisify } from 'node:util'
|
|
import './MongoHelper.js'
|
|
import testLogRecorder from '@overleaf/logger/test-log-recorder.js'
|
|
|
|
export { db } from '../../../../app/js/mongodb.js'
|
|
|
|
let serverPromise = null
|
|
|
|
export async function ensureRunning() {
|
|
if (!serverPromise) {
|
|
const { app } = await createServer()
|
|
const startServer = promisify(app.listen.bind(app))
|
|
serverPromise = startServer(3010, '127.0.0.1')
|
|
}
|
|
return serverPromise
|
|
}
|
|
|
|
if (process.env.CI === 'true') {
|
|
beforeEach('record error logs in junit', testLogRecorder)
|
|
}
|