test: fixed tests for plugin spec

This commit is contained in:
Folke Lemaitre 2023-10-16 15:11:01 +02:00
parent 1cfd6d1f36
commit 1ea2eaefa6
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 2 additions and 0 deletions

View File

@ -237,6 +237,7 @@ describe("plugin spec opt", function()
local spec = Plugin.Spec.new(test)
assert(#spec.notifs == 0)
assert(vim.tbl_count(spec.plugins) == 1)
Plugin.values(spec.plugins.bar, "event", true)
assert(type(spec.plugins.bar.event) == "table")
assert(#spec.plugins.bar.event == 2)
assert(vim.tbl_contains(spec.plugins.bar.event, "mod1"))
@ -299,6 +300,7 @@ describe("plugin spec opt", function()
local spec = Plugin.Spec.new(test)
assert(#spec.notifs == 0)
assert(vim.tbl_count(spec.plugins) == 1)
Plugin.values(spec.plugins.bar, "event", true)
assert(type(spec.plugins.bar.event) == "table")
assert(#spec.plugins.bar.event == 2)
assert(vim.tbl_contains(spec.plugins.bar.event, "mod1"))