Skip to content

Commit adc99b8

Browse files
authored
feat(treesitter): pass string arg for position_id (#20)
1 parent d506f83 commit adc99b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/neotest-go/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ end
305305

306306
---@param position neotest.Position The position to return an ID for
307307
---@param namespaces neotest.Position[] Any namespaces the position is within
308-
local function generate_position_id(position, namespaces)
308+
function adapter._generate_position_id(position, namespaces)
309309
local prefix = {}
310310
for _, namespace in ipairs(namespaces) do
311311
if namespace.type ~= 'file' then
@@ -379,7 +379,7 @@ function adapter.discover_positions(path)
379379
return lib.treesitter.parse_positions(path, query, {
380380
require_namespaces = false,
381381
nested_tests = true,
382-
position_id = generate_position_id,
382+
position_id = "require('neotest-go')._generate_position_id",
383383
})
384384
end
385385

0 commit comments

Comments
 (0)