Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-x committed Oct 20, 2024
1 parent d554eb6 commit 5b070bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lua/go/gotest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,6 @@ end
M.test_func = function(...)
local args = { ... } or {}
log(args)

local ns = M.get_test_func_name()
if empty(ns) then
return M.select_tests()
end
local bufnr = get_test_filebufnr()
local ok, p = vim.treesitter.get_parser(bufnr, 'go')
if not ok or not p then
Expand All @@ -515,6 +510,10 @@ M.test_func = function(...)
vim.log.levels.WARN
)
end
local ns = M.get_test_func_name()
if empty(ns) then
return M.select_tests()
end
return run_tests_with_ts_node(args, ns)
end

Expand Down
1 change: 1 addition & 0 deletions lua/tests/go_test_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local busted = require('plenary/busted')
local godir = cur_dir .. '/lua/tests/fixtures'

-- hack latest nvim treestitter get_node_text bug
-- TODO remove this after nvim-treesitter is fixed
local nvim11 = vim.fn.has('nvim-0.11') == 1

describe('should run func test', function()
Expand Down

0 comments on commit 5b070bf

Please sign in to comment.