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
Replace return undefined; with return -1; in problems/001-sum.js
git add .
npx jest --findRelatedTests Problems/001-sum.js. Note: the real path to the file is problems/001-sum.js - the first letter is lowercased
Output:
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
No files found in C:\Users\publi\js\js-problems.
Make sure Jest's configuration does not exclude this directory.
To set up Jest, make sure a package.json file exists.
Jest Documentation: facebook.github.io/jest/docs/configuration.html
Pattern: Problems\\001-sum.js - 0 matches
Expected behavior
FAIL problems/__tests__/001.js
× Тестирование задачи "001-sum" (1008ms)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 2.226s
Ran all test suites related to files matching /Problems\001-sum.js/i.
It may look so minor because all you need is write a path correctly. However I have 100% repro when commit through VSCode's SCM. It triggers pre-commit husky hook which generate lint-staged tasks with [ 'c:\\Users\\publi\\js\\js-problems\\problems\\001-sum.js' ] fileList (lower-case 'c') and jest cannot find this file.
Is it possible to fix that issue? I've tried to find a piece of code that do that, but without success.
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
To Reproduce
Steps to reproduce the behavior:
return undefined;
withreturn -1;
inproblems/001-sum.js
git add .
npx jest --findRelatedTests Problems/001-sum.js
. Note: the real path to the file isproblems/001-sum.js
- the first letter is lowercasedOutput:
Expected behavior
Link to repo
npx envinfo --preset jest
resultsThe text was updated successfully, but these errors were encountered: