diff options
author | kylo252 <[email protected]> | 2022-01-02 14:53:01 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-02 14:53:01 +0100 |
commit | b3cfd165fbca4c8b595ed577027a5171e33a00e9 (patch) | |
tree | bfc6526edf613b294733d46ff823d69d6e9a58df /tests/specs/plugins_load_spec.lua | |
parent | 73bf039c6333ba9cb3af93437b26c41e14566c47 (diff) |
refactor(test): cleanup test utilities (#2132)
Diffstat (limited to 'tests/specs/plugins_load_spec.lua')
-rw-r--r-- | tests/specs/plugins_load_spec.lua | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/specs/plugins_load_spec.lua b/tests/specs/plugins_load_spec.lua new file mode 100644 index 00000000..08c96c12 --- /dev/null +++ b/tests/specs/plugins_load_spec.lua @@ -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) |