From f86eeb78762da2ea3f2e4baf02cea58a9165aed0 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sat, 20 Sep 2025 16:56:08 -0400 Subject: [PATCH] fix(test): proper stubbing/mocking --- spec/ansi_spec.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/ansi_spec.lua b/spec/ansi_spec.lua index 53d4dd5..ff7a96b 100644 --- a/spec/ansi_spec.lua +++ b/spec/ansi_spec.lua @@ -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]