Skip to content

Commit a77bf39

Browse files
committed
update deepseek
1 parent c5281a6 commit a77bf39

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/adapters/test_deepseek.lua

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ local h = require("tests.helpers")
22
local adapter
33

44
local new_set = MiniTest.new_set
5-
T = new_set({
5+
T = new_set()
6+
7+
T["DeepSeek adapter"] = new_set({
68
hooks = {
79
pre_case = function()
810
adapter = require("codecompanion.adapters").resolve("deepseek")
911
end,
1012
},
1113
})
1214

13-
T["DeepSeek adapter"] = new_set()
14-
1515
T["DeepSeek adapter"]["it can form messages to be sent to the API"] = function()
1616
local messages = { {
1717
content = "Explain Ruby in two words",
@@ -97,19 +97,18 @@ T["DeepSeek adapter"]["No Streaming"] = new_set({
9797
})
9898

9999
T["DeepSeek adapter"]["No Streaming"]["can output for the chat buffer"] = function()
100-
local lines = vim.fn.readfile("tests/adapters/stubs/deepseek_no_streaming.txt")
101-
lines = table.concat(lines, "\n")
100+
local data = vim.fn.readfile("tests/adapters/stubs/deepseek_no_streaming.txt")
101+
data = table.concat(data, "\n")
102102

103-
h.eq("Elegant simplicity.", adapter.handlers.chat_output(adapter, lines).output.content)
103+
h.eq("Elegant simplicity.", adapter.handlers.chat_output(adapter, data).output.content)
104104
end
105105

106106
T["DeepSeek adapter"]["No Streaming"]["can output for the inline assistant"] = function()
107107
local data = vim.fn.readfile("tests/adapters/stubs/deepseek_no_streaming.txt")
108108
data = table.concat(data, "\n")
109109

110-
local json = {
111-
body = data,
112-
}
110+
-- JSON object needs the body key
111+
local json = { body = data }
113112

114113
h.eq("Elegant simplicity.", adapter.handlers.inline_output(adapter, json).output)
115114
end

0 commit comments

Comments
 (0)