Skip to content

Commit 4d6120e

Browse files
test: update test cases
1 parent 311e7da commit 4d6120e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

spec/client/curl/command_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ describe(":Rest run", function()
3434
-- run request
3535
vim.cmd(":Rest run")
3636
nio.sleep(100)
37-
---@diagnostic disable-next-line: undefined-field
3837
assert
38+
---@diagnostic disable-next-line: undefined-field
3939
.spy(spy_notify)
4040
.called_with("request failed. See `:Rest logs` for more info", vim.log.levels.ERROR, { title = "rest.nvim" })
4141
end)

spec/ui/panes_spec.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ local panes = {
1010
{
1111
name = "First",
1212
render = function(self)
13+
vim.bo[self.bufnr].filetype = "local"
1314
vim.b[self.bufnr].name = "first"
1415
return true
1516
end,
@@ -24,6 +25,7 @@ local panes = {
2425

2526
local group = paneui.create_pane_group("test_panes_1", panes, {
2627
on_init = function(self)
28+
vim.bo[self.bufnr].filetype = "global"
2729
utils.nvim_lazy_set_wo(self.bufnr, "winbar", "this-is-a-winbar")
2830
end,
2931
})
@@ -38,6 +40,7 @@ describe("ui.panes", function()
3840
-- enter the pane
3941
group:enter(0)
4042
assert.same("first", vim.b.name)
43+
assert.same("local", vim.bo.filetype)
4144
assert.same("this-is-a-winbar", vim.api.nvim_get_option_value("winbar", { scope = "local" }))
4245

4346
-- cycle to second pane
@@ -58,7 +61,7 @@ describe("ui.panes", function()
5861
end)
5962
it("initialize the buffer back after unloaded", function()
6063
-- ensure there is only one window
61-
vim.cmd("wincmd o")
64+
vim.cmd("silent wincmd o")
6265
assert.same(1, vim.api.nvim_get_current_buf())
6366
group:enter(0)
6467
local pane_buf = vim.api.nvim_get_current_buf()

0 commit comments

Comments
 (0)