You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tests with jest + jest-preset-angular in a non angular-cli app you get a
console.warn node_modules/@angular/material/bundles/material.umd.js:191
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
warning for each of your components that contain an angular material component. Since there is no way of actually loading the theme in a non angular-cli app test you have to disable the warning by injecting some css in the JSDOM page to trick angular material that the page has loaded the css.
This can be done by modifying the setupJest.ts file to look like this