Skip to content

Commit

Permalink
test: update tests to cover preserving highlight groups
Browse files Browse the repository at this point in the history
  • Loading branch information
TymekDev committed Oct 29, 2024
1 parent 0213440 commit 45e9243
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/precognition/e2e_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ describe("e2e tests", function()

it("auto commands are set", function()
local autocmds = vim.api.nvim_get_autocmds({ group = "precognition" })
eq(4, vim.tbl_count(autocmds))
eq(5, vim.tbl_count(autocmds))
precognition.peek()
autocmds = vim.api.nvim_get_autocmds({ group = "precognition" })
eq(7, vim.tbl_count(autocmds))
eq(8, vim.tbl_count(autocmds))
end)

-- it("namespace is created", function()
Expand Down Expand Up @@ -285,4 +285,10 @@ describe("Gutter Priority", function()
eq(1, vim.tbl_count(gutter_extmarks))
eq("gg", gutter_extmarks[1][4].sign_text)
end)

it("preserves highlight groups thgourh a colorscheme change", function()
vim.cmd.colorscheme("default")
local hl = vim.api.nvim_get_hl(0, { name = "PrecognitionHighlight" })
eq(false, vim.tbl_isempty(hl))
end)
end)

0 comments on commit 45e9243

Please sign in to comment.