From fbed3c5b04df52087b894d154b32b8a20b5ee3ff Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Fri, 17 Mar 2017 11:06:18 -0400 Subject: [PATCH] chore(e2e): catch errors from app-scripts to continue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit also return empty array so that if the exact folder isn’t matched it won’t continue to filter and run tests. For example, if you pass `--f=toolbar/color` it will error because that doesn't exist, but still tries to run `toolbar/colors`. --- scripts/gulp/tasks/e2e.prod.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/gulp/tasks/e2e.prod.ts b/scripts/gulp/tasks/e2e.prod.ts index fb68f336a4..24fcfff8b7 100644 --- a/scripts/gulp/tasks/e2e.prod.ts +++ b/scripts/gulp/tasks/e2e.prod.ts @@ -62,6 +62,7 @@ function filterE2eTestfiles() { if (folderInfo && folderInfo.componentName && folderInfo.componentTest) { if (!e2eComponentExists(folderInfo)) { console.log(`Can't find E2E test "${folderInfo.componentName}/test/${folderInfo.componentTest}". Make sure that the test exists and you are passing the correct folder.`); + return []; } const filtered = entryPoints.filter(entryPoint => { return entryPoint.indexOf(`${folderInfo.componentName}/test/${folderInfo.componentTest}`) >= 0; @@ -134,6 +135,8 @@ function buildTest(filePath: string) { return runAppScriptsBuild(appEntryPoint, appNgModulePath, ionicAngularDir, distDir, pathToWriteFile, ionicAngularDir, sassConfigPath, copyConfigPath, argv.dev).then(() => { const end = Date.now(); console.log(`${filePath} took a total of ${(end - start) / 1000} seconds to build`); + }).catch((err) => { + console.log(`${err}`); }); }