-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to find tests that contain []
in the file path
#108
Unable to find tests that contain []
in the file path
#108
Comments
Updates the file path parsing to escape special characters. This fixes nvim-neotest#108 Co-Authored-By: Luke Glazebrook <[email protected]>
I have |
@imfaber, not sure what's happening there. I just tried with a test that has a path like this |
@conermurphy in the directory but actually the overall path doesn't look good. No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\Users\fabri\dev\EnergyShop.HomeQgo-v2\Api\ClientApp
1014 files checked.
testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 171 matches
testPathIgnorePatterns: \\node_modules\\, \\e2e - 994 matches
testRegex: - 0 matches
Pattern: C:\\\Users\\\fabri\\\dev\\\EnergyShop.HomeQgo\-v2\\\ClientApp\\\core\\\campaign.spec.ts - 0 matches If I revert this change it works Test Suites: 1 passed, 1 total
Tests: 1 skipped, 1 passed, 2 total
Snapshots: 0 total
Time: 3.103 s
Ran all test suites matching /C:\\Users\\fabri\\dev\\EnergyShop.HomeQgo-v2\\ClientApp\\core\\campaign.spec.ts/ |
@imfaber, are you running this on Windows? I'm presuming so by the Could also be something happening in the |
@conermurphy yes I'm on Windows and |
When I try to run the tests in a file and that file's path contains the characters
[]
neotest is unable to find the test and returns aNo tests found, exiting with code 1
error.I came across this closed issue but it seems this bug still happens.
As an example this test file path would get the above no tests error:
./foo/[bar]/foo.test.ts
.However, this file path would be fine and run as expected
./foo/bar/foo.test.ts
.I've checked and the tests with the
[]
in the filename are correctly found by running Jest in the CLI and are able to be run in the VSCode Jest extension so I think the issue is specific to Neovim.The text was updated successfully, but these errors were encountered: