fix(test): proper stubbing/mocking

This commit is contained in:
Barrett Ruth 2025-09-20 16:56:08 -04:00
parent ac21638550
commit f86eeb7876

View file

@ -224,7 +224,8 @@ describe('ansi parser', function()
ansi.setup_highlight_groups()
local highlight = vim.api.nvim_get_hl(0, { name = 'CpAnsiRed' })
assert.equals('NONE', highlight.fg)
-- When 'NONE' is set, nvim_get_hl returns nil for that field
assert.is_nil(highlight.fg)
for i = 0, 15 do
vim.g['terminal_color_' .. i] = original_colors[i]