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
Jest watch fails when used in a git monorepo containing a sub-project named ui - and a default branch called ui.
jest --watch fails with:
fatal: ambiguous argument 'ui': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
To Reproduce
Check out the monorepo and run npx jest --watch
Expected behavior
Jest should start watching the files. Instead, it appears that the 'jest-changed-files' tool does not handle cases where the default branch and test root have the same name.
If I run git diff commands from the ui folder it is fine - so it's possible that a cwd before running git commands might fix it?
I encountered this error too. In my case, the branch with the same name as the subdirectory was not my default branch and deleting the branch worked around the issue.
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
Jest watch fails when used in a git monorepo containing a sub-project named
ui
- and a default branch calledui
.jest --watch
fails with:To Reproduce
Check out the monorepo and run
npx jest --watch
Expected behavior
Jest should start watching the files. Instead, it appears that the 'jest-changed-files' tool does not handle cases where the default branch and test root have the same name.
If I run
git diff
commands from theui
folder it is fine - so it's possible that a cwd before running git commands might fix it?Link to repl or repo (highly encouraged)
https://github.com/nicthemighty/jest-watch
envinfo
The text was updated successfully, but these errors were encountered: