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

Getting failures from jest when trying to use MockComponent #2846

Closed
grosch opened this issue Jun 19, 2022 · 3 comments · Fixed by #2848
Closed

Getting failures from jest when trying to use MockComponent #2846

grosch opened this issue Jun 19, 2022 · 3 comments · Fixed by #2848
Assignees
Labels
bug Something isn't working released v14.0.1

Comments

@grosch
Copy link

grosch commented Jun 19, 2022

Description of the bug

When using Angular 14, jest and jest-preset-angular, testing with ESM, it fails when I try to use MockComponent. In the attached zip you can see a simple barebones project that has a single test file. The package.json uses the nasty node command that seems to be required for this.

I tried putting the mock in the imports as well, instead of the declarations, but it didn't seem to make a difference.

A repo with an example of the bug

foo.zip

@grosch grosch added the bug Something isn't working label Jun 19, 2022
@satanTime
Copy link
Member

Hi @grosch, thank you a lot! I'll take a look today.

@satanTime
Copy link
Member

I was able to reproduce the issue. Thanks again!

satanTime added a commit to satanTime/ng-mocks that referenced this issue Jun 19, 2022
satanTime added a commit that referenced this issue Jun 19, 2022
fix(core): provide mjs in package.json #2846
@satanTime
Copy link
Member

v14.0.1 has been released and contains a fix for the issue. Feel free to reopen the issue or to submit a new one if you meet any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released v14.0.1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants