Whenever I test a component that uses Angular Material inside it I get an annoying warning in the test output that I don't know how to clean up. How do I add a stub or polyfill for HammerJS?
WARN LOG: 'Could not find HammerJS. Certain Angular Material components may not work correctly.'
WARN: 'Could not find HammerJS. Certain Angular Material components may not work correctly.'
Couple notes: I'm using Angular CLI v. 1.0.1 with Angular Materials v. 2.0.0.beta.3
I have been able to resolve this by adding the following line to the files array in karma.config.js
{ pattern: './node_modules/@angular/material/prebuilt-themes/indigo-pink.css', included: true, watched: true }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With