DEV Community

Discussion on: TDD in Angular - Dependency Injection and Mocking

bravemaster619 profile image

Angular TDD is really annoying when you have to inject every dependency to TestBed for each component.

qarunqb profile image
Bearded JavaScripter Author

Yep it can get annoying at times. At that point, there's usually a compromise to be made between the number of dependencies for a component and what the conponent can do in terms of features.

There are articles that say to keep the dependencies per component less that 3, but sometimes it's inevitable