Option to disable global-mocks on jest builder
See original GitHub issueDescribe the Bug
I’m having problems with the global mocks configured, I would like to disable them. Could be posible to provide an option in angular.json
to disable it?
Minimal Reproduction
I think it isn’t needed
Expected Behavior
And option to disable the mocks applied
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Libs
- @angular/core version: latest
- @angular-devkit/build-angular version: latest
- @angular-builders/jest version: latest
For Tooling issues:
I think it isn't needed
Others:
None
## Additional Context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Developers - Option to disable global-mocks on jest builder -
I'm having problems with the global mocks configured, I would like to disable them. Could be posible to provide an option in angular.json...
Read more >@angular-builders/jest - npm
Start using @angular-builders/jest in your project by running `npm i ... want to disable one or more of these mocks just pass an...
Read more >jestjs - Can't run tests in a Angular 9 project - Stack Overflow
In my opinion, the main reason for jest to not work is the mismatch between the version of jest , jest-preset-angular , @angular-builders/jest...
Read more >Setup Unit Testing Tools in Angular CLI Project
You may find details how to change the builder options here. Setup Jest in our Project. We create a config file in project's...
Read more >ES6 Class Mocks - Jest
... of the class, this is the easiest option to set up. ... Jest will disable this check for variables that start with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just to add to this, I was running into some trouble using @testing-library/angular and its accessibility selectors. The getComputedStyle mock seems to to interfere with discoverability of accessible elements.
Thanks @tonivj5 . Just FYI you’re not forgotten, I have a proper solution in mind just need to find time to implement it.