From e0d0f64dc53bea5196a78b1ddb0912e47fac574b Mon Sep 17 00:00:00 2001 From: vsavkin Date: Tue, 3 Oct 2017 14:27:52 -0400 Subject: [PATCH] fix(schematics): strip out colors from the output when running e2e tests --- e2e/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/utils.ts b/e2e/utils.ts index 1e4e4097c7..178e3d4c0c 100644 --- a/e2e/utils.ts +++ b/e2e/utils.ts @@ -17,7 +17,8 @@ export function ngNewBazel(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