Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmorris180 committed Jan 16, 2024
1 parent c429f84 commit 8f88600
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions tests/resources/execute_anon/lua/mocks/plenary/job.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ local Debug = require("salesforce.debug")
local PlenaryJobMock = {}

local mock_output = vim.fn.readfile("tests/resources/execute_anon/mock-output.txt")
mock_output = table.concat(mock_output)

function PlenaryJobMock:new(args)
Debug:log("Mock plenary.job", "Creating new instance")
Expand All @@ -18,7 +17,7 @@ function PlenaryJobMock:result()
end

function PlenaryJobMock:start()
self.on_exit(self)
self.on_exit(self, 0)
end

return PlenaryJobMock
2 changes: 1 addition & 1 deletion tests/test_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local T = MiniTest.new_set({
-- Restart child process with minimal 'init.lua' script
child.setup()
child.lua([[M = require("salesforce")]])
child.lua([[C = require("salesforce.config")]]) -- needed for eq_config
child.lua([[C = require("salesforce.config")]])
end,
-- This will be executed one after all tests from this set are finished
post_once = child.stop,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_execute_anon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ end

local get_buf_content = function()
local buff_content = child.api.nvim_buf_get_lines(0, 0, -1, false)
return table.concat(buff_content, "\n")
return table.concat(buff_content)
end

T["execute_anon()"] = MiniTest.new_set()
Expand Down

0 comments on commit 8f88600

Please sign in to comment.