Open FedeAbella opened 6 months ago
I can confirm this issue, it happens to me when there's an underscore in the test description like "test the _document.head file". When I run the tests nearest. The command just skips the targeted test. It doesn't work even if I escape the underscore.
there is undocumented option "escapeRegex"
so i initiate jester with escapeRegex = false
:
local cmd = " ./node_modules/.bin/jest --runInBand --colors --detectOpenHandles -t '$result' -- $file"
vim.keymap.set("n", "<leader>jr", function()
require("jester").run({ cmd = "node" .. cmd, escapeRegex = false })
end)
vim.keymap.set("n", "<leader>jd", function()
require("jester").run({ cmd = "node --inspect-brk" .. cmd, escapeRegex = false })
end)
or we can produce an PR to improve escaping algorithm
@David-Kunz may be extend the available options in README examples?
This is basically a copy of #10. I commented there, but given it's closed, it might get lost so just repeating that here:
I can share what is being run on my case:
Please note the
npx sfdx-lwc-jest --
is a wrapper around jest, but works fine if the dashes are not double escaped:npx sfdx-lwc-jest -- -t '^c-api-data-fetcher does not display' force-app/main/default/lwc/apiDataFetcher/__tests__/apiDataFetcher.test.js
works fine (I dropped the $, but it just ends up running multiple tests)This is my config:
Replicated in
bash
andzsh
. Both in and out oftmux
, and both inalacritty
andgnome-terminal
.Let me know what other info I can get for you.