test: fix spec tests

This commit is contained in:
Folke Lemaitre 2024-06-18 22:09:49 +02:00
parent 1e0ab0574e
commit 59b9d3c2b8
1 changed files with 4 additions and 1 deletions

View File

@ -52,7 +52,10 @@ describe("plugin spec url/name", function()
local spec = Plugin.Spec.new(test[1]) local spec = Plugin.Spec.new(test[1])
local plugins = vim.tbl_values(spec.plugins) local plugins = vim.tbl_values(spec.plugins)
plugins[1]._ = {} plugins[1]._ = {}
assert(#spec.notifs == 0) local notifs = vim.tbl_filter(function(notif)
return notif.level > 3
end, spec.notifs)
assert(#notifs == 0, vim.inspect(spec.notifs))
assert.equal(1, #plugins) assert.equal(1, #plugins)
plugins[1]._.super = nil plugins[1]._.super = nil
assert.same(test[2], plugins[1]) assert.same(test[2], plugins[1])