jeudi 18 mai 2017

Angular 2 Unit Test How to put all services once in providers

I have a component in MyModule that injects a lot of services. When i go to my spec file, i need to add one by one to the Testbed's providers array:

TestBed.configureTestingModule({
    providers: [ Service1, Service2, ... ]
}).compileComponents();

How can i inject all of those services once ?

Thanks !

Aucun commentaire:

Enregistrer un commentaire