Skip to content

Commit

Permalink
fix: differentiate between "skip" and "debug_skip"
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Jul 3, 2024
1 parent db8982f commit c4bcc4f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lua/neotest-golang/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ function M.workaround_neotest_issue_391(result)
-- FIXME: once output is parsed, erase file contents, so to avoid JSON in
-- output panel. This is a workaround for now, only because of
-- https://github.com/nvim-neotest/neotest/issues/391
vim.fn.writefile({ "" }, result.output)
if result.output ~= nil then
vim.fn.writefile({ "" }, result.output)
end
end

--- Adapter options.
Expand Down
2 changes: 1 addition & 1 deletion lua/neotest-golang/parse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ local M = {}
--- @param tree neotest.Tree
--- @return table<string, neotest.Result>
function M.results(spec, result, tree)
if spec.context.skip == true then
if spec.context.debug_and_skip == true then
---@type table<string, neotest.Result>
local results = {}
results[spec.context.id] = {
Expand Down
2 changes: 1 addition & 1 deletion lua/neotest-golang/runspec_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function M.build(pos, strategy)

if runspec_strategy ~= nil then
run_spec.strategy = runspec_strategy
run_spec.context.skip = true
run_spec.context.debug_and_skip = true
end

return run_spec
Expand Down

0 comments on commit c4bcc4f

Please sign in to comment.