From 63f0ded5cf3929d9c1ad7f3a6d0fd67971b26896 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Thu, 24 Oct 2019 10:53:42 -0700 Subject: [PATCH] fix(ivy): fix broken typechecking test on Windows (#33376) One of the template type-checking tests relies on the newline character, which is different on Windows. This commit fixes the issue. PR Close #33376 --- .../src/ngtsc/typecheck/test/type_constructor_spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/src/ngtsc/typecheck/test/type_constructor_spec.ts b/packages/compiler-cli/src/ngtsc/typecheck/test/type_constructor_spec.ts index 1d45b8c8afbd4..4f5e9b079556a 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/test/type_constructor_spec.ts +++ b/packages/compiler-cli/src/ngtsc/typecheck/test/type_constructor_spec.ts @@ -159,7 +159,7 @@ TestClass.ngTypeCtor({value: 'test'}); const TestClassWithCtor = getDeclaration(res.program, _('/main.ts'), 'TestClass', isNamedClassDeclaration); const typeCtor = TestClassWithCtor.members.find(isTypeCtor) !; - const ctorText = typeCtor.getText().replace(/[ \n]+/g, ' '); + const ctorText = typeCtor.getText().replace(/[ \r\n]+/g, ' '); expect(ctorText).toContain( 'init: Pick | { bar: typeof TestClass.ngAcceptInputType_bar; }'); });