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

@angular/core and @angular/platform-browser-dynamic not listed in peerDependancies #140

Closed
freshfunkee opened this issue Apr 13, 2018 · 7 comments

Comments

@freshfunkee
Copy link
Contributor

Hi,

I've just discovered this library. Kudos for the great work. It has really simplified our Jest setup while we are migrating our angular projects.

I thought I'd bring this to your attention, as I experienced it while installing the package.

We have a small repo with some simple angular api services. It's not a full application. It has a relatively straightforward setup. When I had the jest-preset-angular library configured with jest, I received an error :

Cannot find module '@angular/platform-browser-dynamic/testing' from 'setupJest.js'

Our repo doesn't use this module directly, so I would have expected it to have been raised as a missing peer dependancy upon installing the package. From looking at the setupJest.js file, it also appears that @angular/core is also imported. Of course, angular projects should be expected to have this file, but this module should list this as a peer dependancy regardless.

@thymikee
Copy link
Owner

Would you be interested in adding them as peer deps to this project? 🙂 cc @AhnpGit

@freshfunkee
Copy link
Contributor Author

Fixed with PR 141 #141

@just-jeb
Copy link

just-jeb commented Jun 8, 2021

Is the issue back?
It's not listed in peerDependencies now, however it is required in the setup file.
For me it results in the following error (working with Yarn):

Cannot find module '@angular/platform-browser-dynamic/testing' from '../../../../node_modules/jest-preset-angular/build/config/setup-jest.js'

Am I missing something?

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jun 8, 2021

"@angular/platform-browser-dynamic" was missing in peerDependencies indeed.

@just-jeb
Copy link

just-jeb commented Jun 8, 2021

So should this issue be reopened then?

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jun 8, 2021

fixed in 9.0.3, just published

@just-jeb
Copy link

just-jeb commented Jun 8, 2021

Cool, thanks!

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

4 participants