Skip to content

Commit

Permalink
test: return a consistent icon in snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsho committed Jun 2, 2023
1 parent 2db3949 commit 02d7950
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions tests/bufferline_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,7 @@ describe("Bufferline tests:", function()
state = require("bufferline.state")
config = require("bufferline.config")
icons = require("nvim-web-devicons")
icons.setup({
default = true,
override = {
default = {
icon = "",
},
},
})
icons.setup({ default = true })
end)

after_each(function() vim.cmd("silent %bwipeout!") end)
Expand Down Expand Up @@ -92,7 +85,7 @@ describe("Bufferline tests:", function()
"  a.txt    b.txt    c.txt  ",
}
it("should add correct padding if close icons are present", function()
bufferline.setup()
bufferline.setup({ options = { get_element_icon = function() return "" end } })
vim.cmd("file! a.txt")
vim.cmd("edit b.txt")
vim.cmd("edit c.txt")
Expand All @@ -105,6 +98,7 @@ describe("Bufferline tests:", function()
it("should add correct padding if close icons are absent", function()
bufferline.setup({
options = {
get_element_icon = function() return "" end,
show_buffer_close_icons = false,
},
})
Expand All @@ -119,6 +113,7 @@ describe("Bufferline tests:", function()
it("should show the correct separators", function()
bufferline.setup({
options = {
get_element_icon = function() return "" end,
separator_style = "slant",
},
})
Expand Down

0 comments on commit 02d7950

Please sign in to comment.