title: Painful unit test arrangement In Angular / Jasmine
body: <p>It is being really painful to configure testing module for my unit tests in Angular.</p>
  <p>The problem is that I don't have an easy way to see which are my dependencies, so what I do is to start karma with ng test. Then, I see the the components, modules or services missing in the errors page. I add the missing dependencies. Run again ng test. etc. Error. Add the missing...</p>
  <p>This is an example of the dependencies I need for some unit tests:</p>
  <pre><code>TestBed.configureTestingModule({
    declarations: [TestedComponent, X, Y, Z, A, B, C, D, E,F, G, H,I,J, K,L,M,N,O,P,Q,R,S,T,U,V,W, A2],
    imports: [HttpClientTestingModule, TranslateModule.forChild(), TooltipModule, CheckboxModule, FormsModule, ReactiveFormsModule, KeyFilterModule,
      DropdownModule, MultiSelectModule, CalendarModule, InputMaskModule, BlockUIModule, OverlayPanelModule, ProgressSpinnerModule,
      AutoCompleteModule],
    providers: [
      TranslateStore,
      {provide: XProvider, useFactory: () =&gt; createXServiceDummy()},
      DateTimeFormatPipe,
      {provide: YService, useValue: createYServiceServiceDummy()}
     ]
  }).compileComponents();
  </code></pre>
  <p>It can take me 1 hour to prepare all the needed dependencies - that is crazy!</p>
  <p>What am I doing wrong? How do you do this in your projects? It also get more complicated if I need to add spies for my services!</p>