mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #19416 from overleaf/jpa-test-debug
[web] tests: use named before-all/after-all hooks for mongo setup GitOrigin-RevId: bbdd0f27d310eac730cec3e2230f177d8112acd8
This commit is contained in:
parent
2d2746ef24
commit
a55d9fcf38
1 changed files with 4 additions and 4 deletions
|
@ -10,12 +10,12 @@ const DEFAULT_ENV = 'saas'
|
|||
|
||||
module.exports = {
|
||||
initialize() {
|
||||
before(waitForDb)
|
||||
before('wait for db', waitForDb)
|
||||
if (process.env.CLEANUP_MONGO === 'true') {
|
||||
before(dropTestDatabase)
|
||||
before('drop test database', dropTestDatabase)
|
||||
}
|
||||
|
||||
before(function (done) {
|
||||
before('run migrations', function (done) {
|
||||
const args = [
|
||||
'run',
|
||||
'migrations',
|
||||
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
})
|
||||
})
|
||||
|
||||
afterEach(async function () {
|
||||
afterEach('purge mongo data', async function () {
|
||||
return Promise.all(
|
||||
Object.values(db).map(async collection => {
|
||||
if (collection === db.migrations) {
|
||||
|
|
Loading…
Reference in a new issue