bootstrap_spec.lua 1.0 KB

12345678910111213141516171819202122232425262728
  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. local lvim_config_path = get_config_dir() or home_dir .. "/.config/lvim"
  6. local lvim_runtime_path = get_runtime_dir() or home_dir .. "/.local/share/lunarvim"
  7. a.it("shoud be able to detect test environment", function()
  8. assert.truthy(os.getenv "LVIM_TEST_ENV")
  9. assert.falsy(package.loaded["impatient"])
  10. end)
  11. a.it("should not be reading default neovim directories in the home directoies", function()
  12. local rtp_list = vim.opt.rtp:get()
  13. assert.falsy(vim.tbl_contains(rtp_list, vim.fn.stdpath "config"))
  14. end)
  15. a.it("should be able to read lunarvim directories", function()
  16. local rtp_list = vim.opt.rtp:get()
  17. assert.truthy(vim.tbl_contains(rtp_list, lvim_runtime_path .. "/lvim"))
  18. assert.truthy(vim.tbl_contains(rtp_list, lvim_config_path))
  19. end)
  20. a.it("should be able to run treesitter without errors", function()
  21. assert.truthy(vim.treesitter.highlighter.active)
  22. end)
  23. end)