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
This commit is contained in:
Paul Gschwendtner 2019-02-19 17:29:04 +01:00 committed by Ben Lesh
parent d0b6622b9a
commit 3336de0970
2 changed files with 4 additions and 4 deletions

View File

@ -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:

View File

@ -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))