You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running jest via the programmatic interface with "projects" gives an error:
Error: Jest: Cannot use configuration as an object without a file path.
at readConfig (/home/nicojs/github/jest-issue-projects/node_modules/jest-config/build/index.js:188:13)
at /home/nicojs/github/jest-issue-projects/node_modules/jest-config/build/index.js:447:18
at Array.map (<anonymous>)
at readConfigs (/home/nicojs/github/jest-issue-projects/node_modules/jest-config/build/index.js:441:10)
at async runCLI (/home/nicojs/github/jest-issue-projects/node_modules/@jest/core/build/cli/index.js:230:59)
PASS server server/server.test.js
PASS client client/client.test.js
The reason for the error is that the readConfig logic of jests demands there to be a config file, so that it can resolve the projects from that directory. I would expect it to fall back on the location of this project, which is provided as process.cwd().
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
Running jest via the programmatic interface with
"projects"
gives an error:To Reproduce
I've created a small repro repo:
jest-cli-issue-projects.zip
npm i
.npx jest
.node run-jest.js
The code of
run-jest.js
is this:Expected behavior
The reason for the error is that the
readConfig
logic of jests demands there to be a config file, so that it can resolve the projects from that directory. I would expect it to fall back on the location of this project, which is provided asprocess.cwd()
.envinfo
The text was updated successfully, but these errors were encountered: