Skip to content

Commit 61def7b

Browse files
committed
fixup! fix(@schematics/angular): set explicit type for the module --route component
1 parent b7b643d commit 61def7b

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

‎packages/schematics/angular/module/index_spec.ts‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -165,28 +165,6 @@ describe('Module Schematic', () => {
165165
);
166166
});
167167

168-
it('should not inherit the component `type` from the workspace defaults', async () => {
169-
// The CLI applies the `schematics` defaults of `angular.json` to nested schematics as well.
170-
// Emulate it with a fresh runner so that other tests are not affected.
171-
const runner = new SchematicTestRunner(
172-
'@schematics/angular',
173-
require.resolve('../collection.json'),
174-
);
175-
runner['_engineHost'].registerOptionsTransform(
176-
(schematic: { name: string }, options: Record<string, unknown>) =>
177-
schematic.name === 'component' && options['type'] === undefined
178-
? { ...options, type: 'component' }
179-
: options,
180-
);
181-
182-
const tree = await runner.runSchematic('module', options, appTree);
183-
184-
expect(tree.exists('/projects/bar/src/app/foo/foo.ts')).toBe(true);
185-
expect(tree.exists('/projects/bar/src/app/foo/foo.component.ts')).toBe(false);
186-
const content = tree.readContent('/projects/bar/src/app/foo/foo-routing-module.ts');
187-
expect(content).toContain(`import { Foo } from './foo';`);
188-
});
189-
190168
it('should generate a lazy loaded module with embedded route declarations', async () => {
191169
appTree.overwrite(
192170
'/projects/bar/src/app/app-module.ts',

0 commit comments

Comments
 (0)