bootstrap_spec.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. local a = require "plenary.async_lib.tests"
  2. a.describe("initial start", function()
  3. local uv = vim.loop
  4. local home_dir = uv.os_homedir()
  5. -- TODO: update once #1381 is merged
  6. local lvim_config_path = home_dir .. "/.config/lvim"
  7. local lvim_runtime_path = home_dir .. "/.local/share/lunarvim/lvim"
  8. a.it("should not be reading default neovim directories in the home directoies", function()
  9. local rtp_list = vim.opt.rtp:get()
  10. assert.falsy(vim.tbl_contains(rtp_list, vim.fn.stdpath "config"))
  11. end)
  12. a.it("should be able to read lunarvim directories", function()
  13. local rtp_list = vim.opt.rtp:get()
  14. assert.truthy(vim.tbl_contains(rtp_list, lvim_runtime_path))
  15. assert.truthy(vim.tbl_contains(rtp_list, lvim_config_path))
  16. end)
  17. a.it("should be able to run treesitter without errors", function()
  18. assert.truthy(vim.treesitter.highlighter.active)
  19. end)
  20. a.it("should be able to load default packages without errors", function()
  21. -- TODO: maybe there's a way to avoid hard-coding the names of the modules?
  22. local startup_plugins = {
  23. "packer",
  24. "lspconfig",
  25. "nlspsettings",
  26. "null-ls",
  27. }
  28. for _, plugin in pairs(startup_plugins) do
  29. assert.truthy(package.loaded[tostring(plugin)])
  30. end
  31. end)
  32. end)