Skip to content

Commit

Permalink
fixup! test(xod-client): add a test for the recovering process
Browse files Browse the repository at this point in the history
  • Loading branch information
brusherru committed Dec 23, 2020
1 parent 0e5eed3 commit 68e5079
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/xod-client-browser/test-func/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,26 @@ import { PORT } from './server.config';

const globalVariables = R.pick(['browser', 'assert'], global);

const now = Date.now();

const startServer = () =>
new Promise((resolve, reject) => {
const compiler = webpack(config);
const server = new WebpackDevServer(compiler);
// Replace the next line with `compiler.hooks.done.tap('onDone', ...`
// after upgrading webpack to version >4
compiler.plugin('done', () => {
// eslint-disable-next-line no-console
console.log(Date.now() - now, 'Webpack compiled');
resolve(server);
});
server.listen(PORT, 'localhost', err => {
if (err) {
console.error(err); // eslint-disable-line no-console
reject(err);
}
// eslint-disable-next-line no-console
console.log(Date.now() - now, 'Webpack dev server is running');
});
});

Expand All @@ -42,6 +48,8 @@ before(async () => {
slowMo: 10,
timeout: 10000,
});
// eslint-disable-next-line no-console
console.log(Date.now() - now, 'Puppeteer launched');
});

after(() => {
Expand Down

0 comments on commit 68e5079

Please sign in to comment.