core: update to mongodb5 (#514)

This commit is contained in:
undefined authored and GitHub committed 2023-02-27 18:31:24 +08:00
1 parent 5a02010120
commit 0685b88066
59 files changed
+610 -601

No files matched your search

+13 -8
View File
@@ -14,14 +14,19 @@ const Root = {
describe('App', () => {
let agent: supertest.SuperAgentTest;
before((done) => {
process.send = ((send) => (data) => {
if (data === 'ready') {
agent = supertest.agent(require('hydrooj').httpServer);
done();
}
return send?.(data) || false;
})(process.send);
before(async () => {
const init = Date.now();
await new Promise((resolve) => {
process.send = ((send) => (data) => {
console.log('send', data);
if (data === 'ready') {
agent = supertest.agent(require('hydrooj').httpServer);
resolve(null);
}
return send?.(data) || false;
})(process.send);
});
console.log('Application inited in %d ms', Date.now() - init);
}, { timeout: 30000 });
const routes = ['/', '/api', '/p', '/contest', '/homework', '/user/1', '/training'];