trying bigget timeout

This commit is contained in:
Pavel Murygin
2022-02-22 20:38:25 +03:00
parent 1d23def404
commit c239be12f2
9 changed files with 55 additions and 58 deletions

View File

@ -3,29 +3,28 @@ import http from 'http';
import path from 'path';
const port = 3000;
const uri = `http://localhost:${port}/`
const uri = `http://localhost:${port}/`;
const publicPath = path.join(__dirname, '../../build/');
console.log(publicPath);
const server = http.createServer((request, response) => {
return handler(request, response, {
public: publicPath
});
})
public: publicPath,
});
});
const startServer = async () => {
return new Promise((resolve: any) => {
server.listen(port, resolve);
})
}
});
};
const stopServer = async () => {
return new Promise((resolve: any) => {
server.close(resolve);
})
}
});
};
describe('smoke test', () => {
beforeAll(startServer);
@ -49,5 +48,5 @@ describe('smoke test', () => {
const content = await elem?.evaluate((x) => x.textContent);
expect(content?.length).toBeGreaterThan(10);
}, 10000);
}, 15000);
});

View File

@ -10,5 +10,5 @@ describe('smoke test', () => {
expect(console.log).toHaveBeenNthCalledWith(1, 'Hello, world!');
expect(console.log).toHaveBeenNthCalledWith(2, 'Wealth awaits you very soon.');
expect(console.log).toHaveBeenNthCalledWith(3, 'The relay time is: ', expect.anything());
}, 10000);
}, 15000);
});

View File

@ -8,5 +8,5 @@ describe('smoke test', () => {
const res = await demoCalculation();
expect(res).toBe(7);
}, 10000);
}, 15000);
});