Browse Source

try fix test error (#3424)

* try fix test error

* try fix ci error in windows
pull/3440/head
陈帅 8 years ago
committed by GitHub
parent
commit
da173d6092
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      jest-puppeteer.config.js
  2. 6
      tests/run-tests.js

1
jest-puppeteer.config.js

@ -9,7 +9,6 @@ module.exports = {
'--no-first-run', '--no-first-run',
'--no-sandbox', '--no-sandbox',
'--no-zygote', '--no-zygote',
'--single-process',
], ],
}, },
}; };

6
tests/run-tests.js

@ -24,7 +24,11 @@ startServer.on('exit', () => {
console.log('Starting development server for e2e tests...'); console.log('Starting development server for e2e tests...');
startServer.stdout.on('data', data => { startServer.stdout.on('data', data => {
console.log(data.toString()); console.log(data.toString());
if (!once && data.toString().indexOf('Compiled successfully') >= 0) { // hack code , wait umi
if (
(!once && data.toString().indexOf('Compiled successfully') >= 0) ||
data.toString().indexOf('Theme generated successfully') >= 0
) {
// eslint-disable-next-line // eslint-disable-next-line
once = true; once = true;
console.log('Development server is started, ready to run tests.'); console.log('Development server is started, ready to run tests.');

Loading…
Cancel
Save