Add file-loader to Karma so assets will resolve in tests

This commit is contained in:
J. Ryan Stinnett 2019-01-18 10:55:00 -06:00
parent 20e296b20e
commit 8b05cca7d2
2 changed files with 5 additions and 0 deletions

View file

@ -168,6 +168,10 @@ module.exports = function (config) {
path.resolve('./test'),
]
},
{
test: /\.(gif|png|svg|ttf)$/,
loader: 'file-loader',
},
],
noParse: [
// for cross platform compatibility use [\\\/] as the path separator

View file

@ -125,6 +125,7 @@
"eslint-plugin-react": "^7.7.0",
"estree-walker": "^0.5.0",
"expect": "^23.6.0",
"file-loader": "^3.0.1",
"flow-parser": "^0.57.3",
"jest-mock": "^23.2.0",
"karma": "^3.0.0",