title: Is there a way to configure component.spec.ts automatically?
body: <p>I am adding unit tests in my Angular 7 app.
  I have 100 components to test, at least, and each one are failing because of the configuration: they need the declaration of each dependencies needed.</p>
  
  <p>This is my component.spec.ts where is the configuration when I execute <code>ng test</code>:</p>
  
  <pre><code>    import { async, ComponentFixture, TestBed } from 
      '@angular/core/testing';
  
      import { myComponent } from './mycomponent';
      import { FontAwesomeModule } from '@fortawesome/angular- 
      fontawesome';
  
      describe('myComponent', () =&gt; {
        let component: myComponent;
        let fixture: ComponentFixture&lt;myComponent&gt;;
  
        beforeEach(async(() =&gt; {
          TestBed.configureTestingModule({
            declarations: [ myComponent ],
            imports: [
              FontAwesomeModule
              // + Others imports
            ]
          })
          .compileComponents();
        }));
  
        beforeEach(() =&gt; {
          fixture = TestBed.createComponent(myComponent);
          component = fixture.componentInstance;
          fixture.detectChanges();
        });
  
        it('should create', () =&gt; {
          expect(component).toBeTruthy();
        });
      });
  </code></pre>
  
  <p>In some components, I add providers. In some cases, I use a mockService. Everything I did, comes from <a href="https://angular.io/guide/testing" rel="nofollow noreferrer">angular docs</a>.</p>
  
  <p>Is there a way to configure easily or automatically unit tests (or end to end tests) with Angular, instead of to add every module needed manually? </p>
  
  <p>I am using Angular 7, jasmine (3.3.1) and karma (4.0.0).</p>