From db6d28353ad5a57081ad3265249e02a513aacaa4 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Fri, 19 Sep 2025 00:33:23 -0400 Subject: [PATCH] fix(ci): add contest to mock --- spec/test_panel_spec.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/test_panel_spec.lua b/spec/test_panel_spec.lua index 5e5db07..9eea040 100644 --- a/spec/test_panel_spec.lua +++ b/spec/test_panel_spec.lua @@ -388,6 +388,18 @@ describe('cp test panel', function() end local diffthis_called = false + if not vim.cmd.diffthis then + local cmd_table = { + split = function() end, + vsplit = function() end, + diffthis = function() end, + } + vim.cmd = setmetatable(cmd_table, { + __call = function(_, cmd_str) return end, + __index = function(_, key) return cmd_table[key] end, + __newindex = function(_, key, value) cmd_table[key] = value end, + }) + end vim.cmd.diffthis = function() diffthis_called = true end