Hans 601f9b38f8 feat(@angular/cli): move angular-cli to @angular/cli (#4328)
This release is otherwise identical to beta.28.
2017-02-01 18:19:50 -08:00

27 lines
775 B
TypeScript

const Task = require('../ember-cli/lib/models/task');
import * as chalk from 'chalk';
import {exec} from 'child_process';
export const E2eTask = Task.extend({
run: function () {
const ui = this.ui;
let exitCode = 0;
return new Promise((resolve) => {
exec(`npm run e2e -- ${this.project.ngConfig.config.e2e.protractor.config}`,
(err: NodeJS.ErrnoException, stdout: string, stderr: string) => {
ui.writeLine(stdout);
if (err) {
ui.writeLine(stderr);
ui.writeLine(chalk.red('Some end-to-end tests failed, see above.'));
exitCode = 1;
} else {
ui.writeLine(chalk.green('All end-to-end tests pass.'));
}
resolve(exitCode);
});
});
}
});