From 3336de0970c5b35a60a9157bfc291cd5395697de Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 19 Feb 2019 17:29:04 +0100 Subject: [PATCH] refactor(ivy): fix typo in ngtsc "listLazyRoutes" method (#28831) Fixes a minor typo in the `listLazyRoutes` method for `ngtsc`. Also in addition fixes that a newly introduced test for `listLazyRoutes` broke the tests in Windows. It's clear that we still don't run tests against Windows, but we also made all other tests pass (without CI verification), and it's not a big deal fixing this while being at it. PR Close #28831 --- packages/compiler-cli/src/ngtsc/program.ts | 2 +- packages/compiler-cli/test/ngtsc/ngtsc_spec.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/compiler-cli/src/ngtsc/program.ts b/packages/compiler-cli/src/ngtsc/program.ts index 08870ad4cd..620be30788 100644 --- a/packages/compiler-cli/src/ngtsc/program.ts +++ b/packages/compiler-cli/src/ngtsc/program.ts @@ -202,7 +202,7 @@ export class NgtscProgram implements api.Program { // Relative entry paths are disallowed. if (entryRoute.startsWith('.')) { throw new Error( - `Falied to list lazy routes: Resolution of relative paths (${entryRoute}) is not supported.`); + `Failed to list lazy routes: Resolution of relative paths (${entryRoute}) is not supported.`); } // Non-relative entry paths fall into one of the following categories: diff --git a/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts b/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts index 6480d69d45..71c02f37d6 100644 --- a/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts +++ b/packages/compiler-cli/test/ngtsc/ngtsc_spec.ts @@ -2520,9 +2520,9 @@ describe('ngtsc behavioral tests', () => { export class TestModule {} `); - const entryModule1 = path.join(env.basePath, 'test#TestModule'); - const entryModule2 = path.join(env.basePath, 'not-test#TestModule'); - const entryModule3 = path.join(env.basePath, 'test#NotTestModule'); + const entryModule1 = path.posix.join(env.basePath, 'test#TestModule'); + const entryModule2 = path.posix.join(env.basePath, 'not-test#TestModule'); + const entryModule3 = path.posix.join(env.basePath, 'test#NotTestModule'); expect(() => env.driveRoutes(entryModule1)).not.toThrow(); expect(() => env.driveRoutes(entryModule2))