Skip to content

Commit 3336de0

Browse files
devversionbenlesh
authored andcommitted
refactor(ivy): fix typo in ngtsc "listLazyRoutes" method (angular#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 angular#28831
1 parent d0b6622 commit 3336de0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/compiler-cli/src/ngtsc/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export class NgtscProgram implements api.Program {
202202
// Relative entry paths are disallowed.
203203
if (entryRoute.startsWith('.')) {
204204
throw new Error(
205-
`Falied to list lazy routes: Resolution of relative paths (${entryRoute}) is not supported.`);
205+
`Failed to list lazy routes: Resolution of relative paths (${entryRoute}) is not supported.`);
206206
}
207207

208208
// Non-relative entry paths fall into one of the following categories:

packages/compiler-cli/test/ngtsc/ngtsc_spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2520,9 +2520,9 @@ describe('ngtsc behavioral tests', () => {
25202520
export class TestModule {}
25212521
`);
25222522

2523-
const entryModule1 = path.join(env.basePath, 'test#TestModule');
2524-
const entryModule2 = path.join(env.basePath, 'not-test#TestModule');
2525-
const entryModule3 = path.join(env.basePath, 'test#NotTestModule');
2523+
const entryModule1 = path.posix.join(env.basePath, 'test#TestModule');
2524+
const entryModule2 = path.posix.join(env.basePath, 'not-test#TestModule');
2525+
const entryModule3 = path.posix.join(env.basePath, 'test#NotTestModule');
25262526

25272527
expect(() => env.driveRoutes(entryModule1)).not.toThrow();
25282528
expect(() => env.driveRoutes(entryModule2))

0 commit comments

Comments
 (0)