mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 09:34:19 +08:00
chore(e2e): make sure chrome exits on completion
This commit is contained in:
@ -5,7 +5,6 @@ const glob = require('glob');
|
||||
const Mocha = require('mocha');
|
||||
const path = require('path');
|
||||
const webdriver = require('selenium-webdriver');
|
||||
const chromedriver = require('chromedriver');
|
||||
const argv = require('yargs').argv
|
||||
|
||||
const Page = require('./page');
|
||||
@ -111,8 +110,9 @@ async function run() {
|
||||
if (takeScreenshots) {
|
||||
snapshot.finish();
|
||||
}
|
||||
|
||||
devServer.close();
|
||||
driver.quit();
|
||||
await driver.quit();
|
||||
|
||||
if (failures) {
|
||||
throw new Error(failures);
|
||||
@ -177,7 +177,8 @@ function validateNodeVersion(version) {
|
||||
// Invoke run() only if executed directly i.e. `node ./scripts/e2e`
|
||||
if (require.main === module) {
|
||||
validateNodeVersion(process.version);
|
||||
run().catch((err) => {
|
||||
run().then(() => {
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
// fail with non-zero status code
|
||||
process.exit(1);
|
||||
|
Reference in New Issue
Block a user