Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/schematics/angular/utility/find-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function findModule(

const errorMsg = foundRoutingModule
? 'Could not find a non Routing NgModule.' +
`\nModules with suffix '${routingModuleExt}' are strictly reserved for routing.` +
`\nModules with suffix '${routingModuleExtensions.join("' or '")}' are strictly reserved for routing.` +
`\nUse the '--skip-import' option to skip importing in NgModule.`
: `Could not find an NgModule. Use the '--skip-import' option to skip importing in NgModule.`;

Expand Down
3 changes: 3 additions & 0 deletions packages/schematics/angular/utility/find-module_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ describe('find-module', () => {
expect(() => findModule(host, 'foo/src/app/anything-routing')).toThrowError(
/Could not find a non Routing NgModule/,
);
expect(() => findModule(host, 'foo/src/app/anything-routing')).toThrowError(
/Modules with suffix '-routing-module\.ts' or '-routing\.module\.ts' are strictly reserved/,
);
});

it('should throw if two modules found', () => {
Expand Down
Loading