Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inject does not find directive provider #630

Open
ccosmincc opened this issue Nov 9, 2023 · 0 comments
Open

inject does not find directive provider #630

ccosmincc opened this issue Nov 9, 2023 · 0 comments

Comments

@ccosmincc
Copy link

ccosmincc commented Nov 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant