mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-28 13:58:27 +02:00
refactor(test): cleanup test utilities (#2132)
This commit is contained in:
parent
73bf039c63
commit
b3cfd165fb
10 changed files with 173 additions and 222 deletions
35
tests/specs/plugins_load_spec.lua
Normal file
35
tests/specs/plugins_load_spec.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
local a = require "plenary.async_lib.tests"
|
||||
|
||||
a.describe("plugin-loader", function()
|
||||
local plugins = require "lvim.plugins"
|
||||
local loader = require "lvim.plugin-loader"
|
||||
|
||||
a.it("should be able to load default packages without errors", function()
|
||||
loader:load { plugins, lvim.plugins }
|
||||
|
||||
-- TODO: maybe there's a way to avoid hard-coding the names of the modules?
|
||||
local startup_plugins = {
|
||||
"packer",
|
||||
}
|
||||
|
||||
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()
|
||||
loader:load { plugins, lvim.plugins }
|
||||
|
||||
require("lvim.lsp").setup()
|
||||
|
||||
local lsp_packages = {
|
||||
"lspconfig",
|
||||
"nlspsettings",
|
||||
"null-ls",
|
||||
}
|
||||
|
||||
for _, plugin in ipairs(lsp_packages) do
|
||||
assert.truthy(package.loaded[plugin])
|
||||
end
|
||||
end)
|
||||
end)
|
Loading…
Add table
Add a link
Reference in a new issue