blob: 6332448ba35d3e44ca6281fed2c373294e7906ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
local a = require "plenary.async_lib.tests"
a.describe("plugin-loader", function()
local plugins = require "lvim.plugins"
local loader = require "lvim.plugin-loader"
pcall(function()
lvim.log.level = "debug"
package.loaded["lvim.core.log"] = nil
end)
a.it("should be able to load default packages without errors", function()
vim.go.loadplugins = true
loader.load { plugins, lvim.plugins }
-- TODO: maybe there's a way to avoid hard-coding the names of the modules?
local startup_plugins = {
"lazy",
}
for _, plugin in ipairs(startup_plugins) do
assert.truthy(package.loaded[plugin])
end
end)
a.it("should be able to load lsp packages without errors", function()
require("lvim.core.builtins").setup("lsp", "lvim.lsp", lvim.lsp)
local lsp_packages = {
"lspconfig",
"nlspsettings",
"null-ls",
}
for _, plugin in ipairs(lsp_packages) do
assert.truthy(package.loaded[plugin])
end
end)
end)
|