mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
a096d98956
[misc] migrate the acceptance tests to the native mongo driver GitOrigin-RevId: 5ec8605cafb28cc9cfeb85d7ee0d1b567cfe49ba
24 lines
575 B
JavaScript
24 lines
575 B
JavaScript
const App = require('../../../app.js')
|
|
const { exec } = require('child_process')
|
|
const { waitForDb, db } = require('../../../app/src/infrastructure/mongodb')
|
|
|
|
require('logger-sharelatex').logger.level('error')
|
|
|
|
before(waitForDb)
|
|
|
|
before(function(done) {
|
|
exec('bin/east migrate', (error, stdout, stderr) => {
|
|
console.log(stdout)
|
|
console.error(stderr)
|
|
if (error) {
|
|
throw error
|
|
}
|
|
App.listen(3000, 'localhost', done)
|
|
})
|
|
})
|
|
|
|
afterEach(async function() {
|
|
return Promise.all(
|
|
Object.values(db).map(collection => collection.deleteMany({}))
|
|
)
|
|
})
|