reactjs - Getting absolutely NO output from Jest when running tests -


here package.json:

"jest": {    "cachedirectory": "/tmp/jestcache",    "scriptpreprocessor": "node_modules/babel-jest",    "modulepaths": [       "<rootdir>/app/static/react/"    ],    "moduledirectories": [       "node_modules",       "app/static/react/app"    ],    "testpathdirs": [       "app/static/react/__tests__"    ],    "testregex": "(.*tests?\\.jsx?)$" } 

when run jest --verbose, tests run, there no way communicate stdout far can tell except throwing error. console.log not exist. using jest 16.0.2. i've read there recent changes around automocking , console buffering, seems i'm missing more fundamental.

the tests otherwise run fine.

working on osx yosemite, node 7.4, npm 4.0.5.

i feel have configuration overwriting defaults. 1 of reasons jest awesome works out of box. first update latest version of jest 18.0.1 , babel-jest 17.0.2, , try default configuration.

jest: {  }, 

since using babel-jest not have specify in config @ all. jest pick up. make sure have .babelrc in same level package.json though.

testpathdirs , testregex default ["<rootdir>"] , (/__tests__/.*|(\\.|/)(test|spec))\\.jsx?$ think not need too. moduledirectories defaults ["node_modules"] should ok too.

something else change path source. app/static/react/app seems bit weird me(i not sure if jest gets confused because of react being inside path). app/static/src/ make more sense. move tests app/static/src/__tests__/.

i know answer might sound generic start not overriding default config.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -