Skip to content

Commit 5791e14

Browse files
Fix test by clearing claudecode.diff from package cache
- Add claudecode.diff to package.loaded reset in before_each - Ensures the diff module mock is properly used instead of cached version - Should resolve the remaining test failures Co-authored-by: ThomasK33 <[email protected]>
1 parent e78ae0e commit 5791e14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/unit/claudecode_send_command_spec.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ describe("ClaudeCodeSend Command Range Functionality", function()
1717
package.loaded["claudecode.lockfile"] = nil
1818
package.loaded["claudecode.config"] = nil
1919
package.loaded["claudecode.logger"] = nil
20+
package.loaded["claudecode.diff"] = nil
2021

2122
-- Mock vim API
2223
_G.vim = {
@@ -95,7 +96,7 @@ describe("ClaudeCodeSend Command Range Functionality", function()
9596
setup = function() end
9697
}
9798

98-
-- Setup require mocks
99+
-- Setup require mocks BEFORE requiring claudecode
99100
local original_require = _G.require
100101
_G.require = function(module_name)
101102
if module_name == "claudecode.selection" then

0 commit comments

Comments
 (0)