question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--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:

  1. git clone https://github.com/mbelsky/js-problems.git
  2. cd js-problems
  3. npm i
  4. 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:closed
  • Created 4 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mbelskycommented, Dec 6, 2019

@netcoding87 I’ve made a pr, but some changes required. I’ll try to fix them this year 😓

1reaction
mbelskycommented, Jan 22, 2020

Fix for this issue has been released in v25.1.0

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found