feat(nvim): support TS/JS test command

This commit is contained in:
Rob Watson 2024-06-16 17:22:24 +02:00
parent d3f864429b
commit 20ecf63ad2
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,8 @@ _G._build_test_cmd = function()
return "bundle exec rspec --format=progress --no-profile " .. path
elseif filetype == "go" then
return "go test -v " .. path:gsub("^(.*)/(.*go)$", "%1/...")
elseif filetype == "typescript" or filetype == "javascript" then
return "pnpm test -- " .. path
else
vim.api.nvim_err_writeln("filetype not supported: " .. filetype)
return nil