-
-
Notifications
You must be signed in to change notification settings - Fork 188
Description
Description
When configuring dependency injection and specially when working with microfrontends, our container often registers services that are accessible to the microfrontends using shared injection tokens. These injection tokens are distributed using npm packages that refer to an injectiontoken of an interface.
When trying to make tests in the microfrontends with spectator, spectator does not support the mocking of the InjectionTokens directly, and the microfrontend does not have the implementation of the service to create the mock of the real implementation as the npm package only contains the interface.
Proposed solution
Mimic the implementation in ngMocks library for InjectionTokens not to have different mocking libraries.
Alternatives considered
Currently when ever I encounter a situation like this I use ngMocks library.
Do you want to create a pull request?
Yes