Skip to content

Commit

Permalink
Quote wildcard for all testNamePattern
Browse files Browse the repository at this point in the history
Some shells (looking at you zsh) try to expand wildcards on the command line before invoking the underlying command resulting in no tests run when targeting a whole file. Quoting the pattern lets it get handled directly by vitest.
  • Loading branch information
phallguy committed Jul 31, 2024
1 parent 353364a commit 46bfeaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/neotest-vitest/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function adapter.build_spec(args)
end

local pos = args.tree:data()
local testNamePattern = ".*"
local testNamePattern = "'.*'"

if pos.type == "test" then
testNamePattern = escapeTestPattern(pos.name) .. "$"
Expand Down

0 comments on commit 46bfeaf

Please sign in to comment.