Error: Can't find a root directory while resolving a config file path.
Provided path to resolve: ./config/jest.config.js
cwd: /home/foton/workspace/self_study/webpack/.cache/jest-webpack
at exports.default (/home/foton/workspace/self_study/webpack/node_mod
ules/jest-config/build/resolveConfigPath.js:65:11) at readConfig (/home/foton/workspace/self_study/webpack/node_modules/
jest-config/build/index.js:166:80)
at getConfigs (/home/foton/workspace/self_study/webpack/node_modules/
jest-cli/build/cli/index.js:473:77)
at Object.<anonymous> (/home/foton/workspace/self_study/webpack/node_
modules/jest-cli/build/cli/index.js:251:23) at Generator.next (<anonymous>)
at step (/home/foton/workspace/self_study/webpack/node_modules/jest-c
li/build/cli/index.js:206:30)
at /home/foton/workspace/self_study/webpack/node_modules/jest-cli/bui
ld/cli/index.js:225:14
at new Promise (<anonymous>) at Object.<anonymous> (/home/foton/workspace/self_study/webpack/node_
modules/jest-cli/build/cli/index.js:203:12)
at Object.runCLI (/home/foton/workspace/self_study/webpack/node_modul
es/jest-cli/build/cli/index.js:317:18)
but with yarn jest --config ./config/jest.config.js --rootDir . I don't have such error.
gives:
but with
yarn jest --config ./config/jest.config.js --rootDir .
I don't have such error.