leetcode.nvim
leetcode.nvim copied to clipboard
Adding a new testcase doesn't stick
Whenever I submit a problem and add a new testcase, then run Leet test, the testcase I added does not appear in the testcases. This means that if I want to see that testcase I have to submit again. Using the most recent version with nvim on mac.
Did you ever figure out how to add own testacases?
Yes, by pressing U on the failed one
@charlietlamb use :hide instead of :q and then testcase will stick.
Please see the difference in source code here:
function ConsoleLayout:unmount() --
ConsoleLayout.super.unmount(self)
self.testcase = Testcase(self)
self.result = Result(self)
self.popups = { self.testcase, self.result }
end
function ConsoleLayout:hide()
ConsoleLayout.super.hide(self)
pcall(function()
local winid = vim.api.nvim_get_current_win()
if winid == self.question.description.winid then
vim.api.nvim_set_current_win(self.question.winid)
end
end)
end
@nxtkofi to add testcases just switch the panel to the left and type them below