mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
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:
@ -62,6 +62,7 @@ function filterE2eTestfiles() {
|
|||||||
if (folderInfo && folderInfo.componentName && folderInfo.componentTest) {
|
if (folderInfo && folderInfo.componentName && folderInfo.componentTest) {
|
||||||
if (!e2eComponentExists(folderInfo)) {
|
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.`);
|
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 => {
|
const filtered = entryPoints.filter(entryPoint => {
|
||||||
return entryPoint.indexOf(`${folderInfo.componentName}/test/${folderInfo.componentTest}`) >= 0;
|
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(() => {
|
return runAppScriptsBuild(appEntryPoint, appNgModulePath, ionicAngularDir, distDir, pathToWriteFile, ionicAngularDir, sassConfigPath, copyConfigPath, argv.dev).then(() => {
|
||||||
const end = Date.now();
|
const end = Date.now();
|
||||||
console.log(`${filePath} took a total of ${(end - start) / 1000} seconds to build`);
|
console.log(`${filePath} took a total of ${(end - start) / 1000} seconds to build`);
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(`${err}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user