From b682bd1916c7562405f8407f56acb4de92c07486 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Wed, 6 May 2020 22:13:32 +0100 Subject: [PATCH] fix(compiler-cli): normalize mock Windows file paths correctly (#36859) Since the `MockFileSystemWindows` is case-insensitive, any drive path that must be added to a normalized path should be lower case to make the path canonical. PR Close #36859 --- .../ngtsc/file_system/testing/src/mock_file_system_windows.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/src/ngtsc/file_system/testing/src/mock_file_system_windows.ts b/packages/compiler-cli/src/ngtsc/file_system/testing/src/mock_file_system_windows.ts index 9cabd0a2b9..e733197d3b 100644 --- a/packages/compiler-cli/src/ngtsc/file_system/testing/src/mock_file_system_windows.ts +++ b/packages/compiler-cli/src/ngtsc/file_system/testing/src/mock_file_system_windows.ts @@ -42,6 +42,6 @@ export class MockFileSystemWindows extends MockFileSystem { } normalize(path: T): T { - return path.replace(/^[\/\\]/i, 'C:/').replace(/\\/g, '/') as T; + return path.replace(/^[\/\\]/i, 'c:/').replace(/\\/g, '/') as T; } }