Skip to content

Commit d7330c4

Browse files
committed
test(@angular/cli): add generate module route option E2E
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)
1 parent fb0be7d commit d7330c4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { expectFileToExist } from '../../../utils/fs';
2+
import { ng } from '../../../utils/process';
3+
4+
export default async function () {
5+
await ng('config', 'schematics.@schematics/angular.component.style', 'scss');
6+
7+
await ng('generate', 'module', 'test', '--routing');
8+
9+
await ng('generate', 'module', 'home', '-m', 'test', '--route', 'home', '--routing');
10+
11+
await expectFileToExist('src/app/home/home.component.scss');
12+
}

0 commit comments

Comments
 (0)