Configure jest -- fix a few common issues
This commit is contained in:
1 parent
ad8b554f04
commit
256ba0d42f
5 files changed
+143
-10
No files matched your search
@@ -0,0 +1,3 @@
|
||||
// https://jestjs.io/docs/en/webpack#handling-static-assets
|
||||
|
||||
module.exports = 'test-file-stub'
|
||||
@@ -0,0 +1,9 @@
|
||||
const _ = require('lodash')
|
||||
const originalConsoleError = console.error
|
||||
|
||||
// JSDom's CSS Parser has limited support for certain features
|
||||
// This supresses error warnings caused by it
|
||||
console.error = function(msg) {
|
||||
if (_.startsWith(msg, 'Error: Could not parse CSS stylesheet')) return
|
||||
originalConsoleError(msg)
|
||||
}
|
||||
Reference in new issue
Block a user