chore(e2e): catch errors from app-scripts to continue

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`.
This commit is contained in:
Brandy Carney
2017-03-17 11:06:18 -04:00
parent da8ce042b6
commit fbed3c5b04

View File

@ -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}`);
});
}