Closed
Description
I'd like to propose to add Angular schematics, so when you create a component with Angular CLI, instead of a default spec file, a shallow-render spec file is generated.
Let's say you execute: ng g c app/shallow-component
It would generate the following spec file:
import { ShallowComponentComponent } from './shallow-component.component';
import { AppModule } from './app.module';
import { Shallow } from 'shallow-render/dist';
describe('ShallowComponentComponent', () => {
let shallow: Shallow<ShallowComponentComponent>;
beforeEach(() => {
shallow = new Shallow(ShallowComponentComponent, AppModule);
});
it('should create', async () => {
const { instance } = await shallow.render();
expect(instance).toBeTruthy();
});
});
@getsaf If you are interested, I can help with a PR as I have got a working solution already.