feat(nvim): support TS/JS test command
This commit is contained in:
parent
d3f864429b
commit
20ecf63ad2
|
@ -20,6 +20,8 @@ _G._build_test_cmd = function()
|
||||||
return "bundle exec rspec --format=progress --no-profile " .. path
|
return "bundle exec rspec --format=progress --no-profile " .. path
|
||||||
elseif filetype == "go" then
|
elseif filetype == "go" then
|
||||||
return "go test -v " .. path:gsub("^(.*)/(.*go)$", "%1/...")
|
return "go test -v " .. path:gsub("^(.*)/(.*go)$", "%1/...")
|
||||||
|
elseif filetype == "typescript" or filetype == "javascript" then
|
||||||
|
return "pnpm test -- " .. path
|
||||||
else
|
else
|
||||||
vim.api.nvim_err_writeln("filetype not supported: " .. filetype)
|
vim.api.nvim_err_writeln("filetype not supported: " .. filetype)
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue