fix(schematics): strip out colors from the output when running e2e tests

This commit is contained in:
vsavkin 2017-10-03 14:27:52 -04:00
parent 0c27aaad95
commit e0d0f64dc5

View File

@ -17,7 +17,8 @@ export function ngNewBazel(command?: string): string {
} }
export function runCLI(command?: string): string { export function runCLI(command?: string): string {
return execSync(`../../node_modules/.bin/ng ${command}`, {cwd: `./tmp/${projectName}`}).toString(); return execSync(`../../node_modules/.bin/ng ${command}`, {cwd: `./tmp/${projectName}`}).toString().replace(
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, '');
} }
// switch to ng generate, once CLI is fixed // switch to ng generate, once CLI is fixed