Skip to content
Snippets Groups Projects
Commit be469861 authored by Jack Reed's avatar Jack Reed
Browse files

enable css to be directly imported/mocked into components for unit testing in jest

parent a0ab72a1
Branches
No related tags found
No related merge requests found
module.exports = {};
......@@ -5,6 +5,9 @@
],
"coverageDirectory": "<rootDir>/coverage",
"coverageReporters": ["html", "lcov"],
"moduleNameMapper": {
"\\.css$": "<rootDir>/__mocks__/css.js"
},
"setupFiles": [
"<rootDir>/setupJest.js"
],
......
......@@ -73,7 +73,7 @@ const baseConfig = [
eslintLoaderConfig,
babelLoaderConfig,
{
test: /\.scss$/,
test: /\.s?css$/,
use: [
'style-loader', // creates style nodes from JS strings
'css-loader', // translates CSS into CommonJS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment