--findRelatedTests path case sensitivity on Windows
See original GitHub issue🐛 Bug Report
Running jest --findRelatedTests <filepath>
with upper-cased part of path does not find any test.
To Reproduce
Steps to reproduce the behavior:
git clone https://github.com/mbelsky/js-problems.git
cd js-problems
npm i
npx jest --findRelatedTests ./PROBLEMS/001-SUM.JS
Result:
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" (5ms)
● Тестирование задачи "001-sum"
expect(received).toBe(expected) // Object.is equality
Expected: 1
Received: undefined
2 |
3 | test('Тестирование задачи "001-sum"', () => {
> 4 | expect(sum(-100)).toBe(1);
| ^
5 | expect(sum(0)).toBe(1);
6 | expect(sum(1)).toBe(1);
7 | expect(sum(2)).toBe(3);
at Object.toBe (problems/__tests__/001.js:4:23)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 1.228s, estimated 2s
Ran all test suites related to files matching /.\\PROBLEMS\\001-SUM.JS/i.
envinfo
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
Binaries:
Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Adjust case sensitivity - WSL - Microsoft Learn
Learn how case sensitive file names are handled between Windows and Linux file systems, how to adjust these settings by directory with WSL, ......
Read more >How can I obtain the case-sensitive path on Windows?
Here is a solution that worked for me to move files between Windows and a server using case sensitive paths. It walks down...
Read more >Jest CLI Options
The jest command line runner has a number of useful options. You can run jest --help to view all available options. Many of...
Read more >Windows 10: Case sensitive file and folder names - N-able
Check Folder Case Sensitivity. To check whether a folder is case sensitive, run the following from a command prompt: fsutil.exe file queryCaseSensitiveInfo < ......
Read more >Jest: e2e/__tests__/findRelatedFiles.test.ts | Fossies
6 */ 7 8 import {tmpdir} from 'os'; 9 import * as path from 'path'; ... to uppercased filename on case-insensitive os', ()...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@netcoding87 I’ve made a pr, but some changes required. I’ll try to fix them this year 😓
Fix for this issue has been released in v25.1.0