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 Mocha = require('mocha');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webdriver = require('selenium-webdriver');
|
const webdriver = require('selenium-webdriver');
|
||||||
const chromedriver = require('chromedriver');
|
|
||||||
const argv = require('yargs').argv
|
const argv = require('yargs').argv
|
||||||
|
|
||||||
const Page = require('./page');
|
const Page = require('./page');
|
||||||
@ -111,8 +110,9 @@ async function run() {
|
|||||||
if (takeScreenshots) {
|
if (takeScreenshots) {
|
||||||
snapshot.finish();
|
snapshot.finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
devServer.close();
|
devServer.close();
|
||||||
driver.quit();
|
await driver.quit();
|
||||||
|
|
||||||
if (failures) {
|
if (failures) {
|
||||||
throw new Error(failures);
|
throw new Error(failures);
|
||||||
@ -177,7 +177,8 @@ function validateNodeVersion(version) {
|
|||||||
// Invoke run() only if executed directly i.e. `node ./scripts/e2e`
|
// Invoke run() only if executed directly i.e. `node ./scripts/e2e`
|
||||||
if (require.main === module) {
|
if (require.main === module) {
|
||||||
validateNodeVersion(process.version);
|
validateNodeVersion(process.version);
|
||||||
run().catch((err) => {
|
run().then(() => {
|
||||||
|
}).catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
// fail with non-zero status code
|
// fail with non-zero status code
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
Reference in New Issue
Block a user