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
Angular test with mocked provider throws error "Can't resolve all parameters for mockConstructor(?)." #1227
Comments
This is probably not To give more background: this is related to a missing |
@wtho no, unfortunately, this is not related to emitDecorators. Here is an issue of how angular resolving dependencies while building the testing module. What has changed in jest itself is migration to typescript which causes jest-mock module to produce a bit diff output for matchArity. This case is closely related to jestjs/jest#8401 |
I see. Looking at the Angular docs there is only an example with an TypeScript I recommend you to use |
I agree with @wtho,
|
Issue
As mentioned in jestjs/jest#8401:
After some investigations, we found that this issue isn't reproducible with jest and babel and have place only with the latest jest24 and ts-jest.
Minimal repo
https://github.com/artemrudenko/jest-angular-ts-jest-issue
To Reproduce
Steps to reproduce the behavior:
yarn
to install all dependenciesyarn test data
to run data.service testCurrent output:
Expected behavior
Provide a mock without failing
The text was updated successfully, but these errors were encountered: