Closed
Description
Description
.ico files are managed by webpack config, but not by jest & eslint configs
Place this code to e.g. App.js:
import myico from './my.ico';
Expected behavior
Tests pass.
Actual behavior
Webpack builds this code successfully, but this code does not pass tests because jest config does not treat .ico files as images. Also .ico files are not mentioned explicitly in eslint config (but other images are), though I did not notice any problem with this.
FAIL src/App.test.js
● Test suite failed to run
/home/vadzim/tmp/cra_ico/src/my.ico:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){
SyntaxError: Invalid or unexpected token
at transformAndBuildScript (node_modules/react-scripts/node_modules/jest-runtime/build/transform.js:284:10)
at Object.<anonymous> (src/App.js:3:37)
at Object.<anonymous> (src/App.test.js:3:38)
Environment
[email protected]
node v6.9.1
npm 3.10.8
Ubuntu 16.10
Command line interface (no browser)
Reproducible Demo
Metadata
Metadata
Assignees
Labels
No labels