With the power of the Angular dependency injection system, you can fake specific use cases. This is useful for automated testing, but in this article, we'll look at a way to use it for manual testing.
Tree shaker dependencies remove the indirection layer, the Angular module, but how do we test their tree shaker provider? We will test the value factory of the injected token that depends on the platform specific API.
Angular modules used to be the primary way to provide application-wide dependencies such as constants, configurations, functions, and class-based services. Starting with Angular version 6, we can create tree-shakable dependencies and even ignore Angular modules.