【发布时间】:2018-01-01 04:22:47
【问题描述】:
我目前正在为一些使用Angular Material 的Angular 组件编写一些单元测试。我现在遇到的问题是在运行单元测试时不断收到以下警告。
console.warn node_modules\@angular\material\bundles\material.umd.js:183
Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.
console.warn node_modules\@angular\material\bundles\material.umd.js:196
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.ang
ular.io/guide/theming
console.warn node_modules\@angular\material\bundles\material.umd.js:3327
Could not find HammerJS. Certain Angular Material components may not work correctly.
看到这些警告是否正常?关于如何抑制这些警告的任何想法,因为我认为它们与单元测试并不真正相关?
【问题讨论】:
标签: angular unit-testing angular-material jestjs