0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

Add 10s delay to route test start

This commit is contained in:
G.Ambatte
2022-03-25 14:39:14 +13:00
parent eaf8b02aa9
commit 5ed6e9842c

View File

@@ -1,5 +1,10 @@
const supertest = require('supertest');
const start = Date.now();
console.log(`START DELAY ${Date.now().toString()}`);
while (Date.now() < start + 10000){};
console.log(`END DELAY ${Date.now().toString()}`);
// Mimic https responses to avoid being redirected all the time
const app = supertest.agent(require('app.js').app)
.set('X-Forwarded-Proto', 'https');