inject does not find directive provider
ccosmincc opened this issue · 0 comments
ccosmincc commented
Is this a regression?
No
Description
Using the inject function for retrieving directive providers throws "No provider for ..." error.
This can be reproduced by adding the following test in this file:
it('should retrieve provider', () => {
host = createHost();
const provider = host.inject(directiveProviderToken, true); // this line will throw "No provider for ... error"
expect(provider).toBeDefined();
});
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
spectator v15.0.1
angular v16.1.0
Anything else?
No response
Do you want to create a pull request?
No