mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: update to mongodb5 (#514)
This commit is contained in:
1 parent
5a02010120
commit
0685b88066
59 files changed
+610
-601
No files matched your search
+13
-8
@@ -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'];
|
||||
|
||||
Reference in new issue
Block a user