Skip to content

Commit 10ccb08

Browse files
MeAkibalan-agius4
authored andcommitted
fixup! fix(@schematics/angular): set explicit type for the app-shell component
1 parent aabcefe commit 10ccb08

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

‎packages/schematics/angular/app-shell/index_spec.ts‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -136,27 +136,5 @@ describe('App Shell Schematic', () => {
136136
const content = tree.readContent(filePath);
137137
expect(content).toContain(`import { AppShell } from './app-shell/app-shell';`);
138138
});
139-
140-
it('should not inherit the component `type` from the workspace defaults', async () => {
141-
// The CLI applies the `schematics` defaults of `angular.json` to nested schematics as well.
142-
// Emulate it with a fresh runner so that other tests are not affected.
143-
const runner = new SchematicTestRunner(
144-
'@schematics/angular',
145-
require.resolve('../collection.json'),
146-
);
147-
runner['_engineHost'].registerOptionsTransform(
148-
(schematic: { name: string }, options: Record<string, unknown>) =>
149-
schematic.name === 'component' && options['type'] === undefined
150-
? { ...options, type: 'component' }
151-
: options,
152-
);
153-
154-
const tree = await runner.runSchematic('app-shell', defaultOptions, appTree);
155-
156-
expect(tree.exists('/projects/bar/src/app/app-shell/app-shell.ts')).toBe(true);
157-
expect(tree.exists('/projects/bar/src/app/app-shell/app-shell.component.ts')).toBe(false);
158-
const content = tree.readContent('/projects/bar/src/app/app.config.server.ts');
159-
expect(content).toContain(`import { AppShell } from './app-shell/app-shell';`);
160-
});
161139
});
162140
});

0 commit comments

Comments
 (0)