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
1 change: 0 additions & 1 deletion packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ export default function (options: ApplicationOptions): Rule {
routing: options.routing,
routingScope: 'Root',
path: sourceDir,
spec: false,
project: options.name,
}),
schematic('component', {
Expand Down
1 change: 0 additions & 1 deletion packages/schematics/angular/library/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ export default function (options: LibraryOptions): Rule {
commonModule: false,
flat: true,
path: sourceDir,
spec: false,
project: options.name,
}),
schematic('component', {
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion packages/schematics/angular/module/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export default function (options: ModuleOptions): Rule {
options.path = parsedPath.path;

const templateSource = apply(url('./files'), [
options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')),
options.routing ? noop() : filter(path => !path.endsWith('-routing.module.ts')),
template({
...strings,
Expand Down
13 changes: 0 additions & 13 deletions packages/schematics/angular/module/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ describe('Module Schematic', () => {
);
const defaultOptions: ModuleOptions = {
name: 'foo',
spec: true,
module: undefined,
flat: false,
project: 'bar',
Expand Down Expand Up @@ -50,7 +49,6 @@ describe('Module Schematic', () => {

const tree = schematicRunner.runSchematic('module', options, appTree);
const files = tree.files;
expect(files.indexOf('/projects/bar/src/app/foo/foo.module.spec.ts')).toBeGreaterThanOrEqual(0);
expect(files.indexOf('/projects/bar/src/app/foo/foo.module.ts')).toBeGreaterThanOrEqual(0);
});

Expand Down Expand Up @@ -104,24 +102,13 @@ describe('Module Schematic', () => {
expect(routingModuleContent).toMatch(/RouterModule.forChild\(routes\)/);
});

it('should respect the spec flag', () => {
const options = { ...defaultOptions, spec: false };

const tree = schematicRunner.runSchematic('module', options, appTree);
const files = tree.files;
expect(files.indexOf('/projects/bar/src/app/foo/foo.module.ts')).toBeGreaterThanOrEqual(0);
expect(files.indexOf('/projects/bar/src/app/foo/foo.module.spec.ts')).toEqual(-1);
});

it('should dasherize a name', () => {
const options = { ...defaultOptions, name: 'TwoWord' };

const tree = schematicRunner.runSchematic('module', options, appTree);
const files = tree.files;
expect(files.indexOf('/projects/bar/src/app/two-word/two-word.module.ts'))
.toBeGreaterThanOrEqual(0);
expect(files.indexOf('/projects/bar/src/app/two-word/two-word.module.spec.ts'))
.toBeGreaterThanOrEqual(0);
});

it('should respect the sourceRoot value', () => {
Expand Down
5 changes: 0 additions & 5 deletions packages/schematics/angular/module/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
"description": "The scope for the generated routing.",
"default": "Child"
},
"spec": {
"type": "boolean",
"description": "Specifies if a spec file is generated.",
"default": true
},
"flat": {
"type": "boolean",
"description": "Flag to indicate if a dir is created.",
Expand Down