Skip to content

Commit

Permalink
test(@angular/cli): add generate module route option E2E
Browse files Browse the repository at this point in the history
This change adds an E2E test for the `--route` option of the module schematic.  This also allows testing that defaults are properly used for the component generated with the option.

(cherry picked from commit 69e35ed)
  • Loading branch information
clydin committed Nov 16, 2020
1 parent fb0be7d commit d7330c4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/legacy-cli/e2e/tests/generate/module/module-route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { expectFileToExist } from '../../../utils/fs';
import { ng } from '../../../utils/process';

export default async function () {
await ng('config', 'schematics.@schematics/angular.component.style', 'scss');

await ng('generate', 'module', 'test', '--routing');

await ng('generate', 'module', 'home', '-m', 'test', '--route', 'home', '--routing');

await expectFileToExist('src/app/home/home.component.scss');
}

0 comments on commit d7330c4

Please sign in to comment.