bug: Sanity checks run in test environement
See original GitHub issueAs I explained in comment on PR ( https://github.com/angular/components/pull/23289 ) I have a lot of warnings coming from angular material sanity checks during my unit test runs, what makes the output unreadable. @jelbourn advised me to open an issue because sanity checks should not run in test environment.
Thanks for your help !
Steps to reproduce:
- Fork https://github.com/eweap/angular-material-warn
- Run
yarn install
then run test withyarn nx test ui
to run the test for the ui lib (its a nrwl/nx workspace)
Expected Behavior
What behavior were you expecting to see? No warning should be display during the test run
Actual Behavior
What behavior did you actually see? A warning is displayed:
console.warn
Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming
at MatCommonModule.Object.<anonymous>.MatCommonModule._checkThemeIsPresent (../../../src/material/core/common-behaviors/common-module.ts:144:15)
at new MatCommonModule (../../../src/material/core/common-behaviors/common-module.ts:81:12)
at Object.MatCommonModule_Factory [as factory] (../../node_modules/@angular/material/bundles/material-core.umd.js:189:69)
at R3Injector.Object.<anonymous>.R3Injector.hydrate (../../../packages/core/src/di/r3_injector.ts:416:29)
at R3Injector.Object.<anonymous>.R3Injector.get (../../../packages/core/src/di/r3_injector.ts:211:23)
at ../../../packages/core/src/di/r3_injector.ts:247:51
at Set.forEach (<anonymous>)
at R3Injector.Object.<anonymous>.R3Injector._resolveInjectorDefTypes (../../../packages/core/src/di/r3_injector.ts:247:27)
Environment
- Angular: 12.2.1
- CDK/Material: 12.2.1
- Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu
Issue Analytics
- State:
- Created 2 years ago
- Comments:22 (9 by maintainers)
Top Results From Across the Web
Sanity checks: Easy Guide For Beginners | Unext Jigsaw
Running sanity checks is a key factor in the data-wrangling process. Sanity checks enable you to check whether the environment is functioning ......
Read more >Sanity Testing – Quick Tutorial on How to do Sanity Test
Sanity testing is a tool to tell whether your software release meets the merit to be exhaustively tested or is too flawed to...
Read more >What is Sanity Testing? Definition of ...
So, the bug is reported by the testing team to the development team to resolve it. When the development team fixes the defect...
Read more >Sanity Testing Vs. Smoke Testing – Difference Between ...
Smoke Testing verifies the critical functionalities of the system whereas Sanity Testing verifies the new functionality like bug fixes.
Read more >Sanity check - Wikipedia
In computer science, a sanity test is a very brief run-through of the functionality of a computer program, system, calculation, or other analysis,...
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
@crisbeto it looks like we should update our test env check to look for jest
fingers crossed this makes it into 13 (also, hurrah for 13 🎉)