-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add e2e flag for igx-ts framework.
- Loading branch information
Showing
2 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
import { ProjectConfig } from "../ProjectConfig"; | ||
import { Util } from "../Util"; | ||
|
||
const command = { | ||
// tslint:disable:object-literal-sort-keys | ||
command: "test", | ||
desc: "tests the project", | ||
builder: {}, | ||
desc: "executes project tests", | ||
builder: { | ||
e2e: { | ||
describe: "Executes end-to-end tests", | ||
type: "boolean" | ||
} | ||
}, | ||
async execute(argv) { | ||
Util.exec("npm test"); | ||
const projConfig = ProjectConfig.getConfig().project; | ||
if (argv.e2e && projConfig.framework === "angular" && projConfig.projectType === "igx-ts") { | ||
Util.exec("npm run e2e", { stdio: "inherit" }); | ||
} else { | ||
Util.exec("npm test", { stdio: "inherit" }); | ||
} | ||
} | ||
}; | ||
export default command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters