diff options
| author | kylo252 <[email protected]> | 2022-01-03 15:49:07 +0100 | 
|---|---|---|
| committer | kylo252 <[email protected]> | 2022-01-03 15:49:07 +0100 | 
| commit | e5aa8be8ce54097e4a34220cb2aad114e70f209b (patch) | |
| tree | 15e0a3017358b15a0656b6d1f98d2638ae572095 /tests/specs/bootstrap_spec.lua | |
| parent | 427ad868d404a254dcbc7d3950946dae0cf205de (diff) | |
| parent | 21b41688ee8c5056ffbb2b07df141ce1ccb4b213 (diff) | |
Merge branch 'rolling'
Diffstat (limited to 'tests/specs/bootstrap_spec.lua')
| -rw-r--r-- | tests/specs/bootstrap_spec.lua | 36 | 
1 files changed, 36 insertions, 0 deletions
| diff --git a/tests/specs/bootstrap_spec.lua b/tests/specs/bootstrap_spec.lua new file mode 100644 index 00000000..c86d22d4 --- /dev/null +++ b/tests/specs/bootstrap_spec.lua @@ -0,0 +1,36 @@ +local a = require "plenary.async_lib.tests" + +a.describe("initial start", function() +  local uv = vim.loop +  local home_dir = uv.os_homedir() +  local lvim_config_path = get_config_dir() or home_dir .. "/.config/lvim" +  local lvim_runtime_path = get_runtime_dir() or home_dir .. "/.local/share/lunarvim" + +  a.it("shoud be able to detect test environment", function() +    assert.truthy(os.getenv "LVIM_TEST_ENV") +    assert.falsy(package.loaded["lvim.impatient"]) +  end) + +  a.it("should not be reading default neovim directories in the home directoies", function() +    local rtp_list = vim.opt.rtp:get() +    assert.falsy(vim.tbl_contains(rtp_list, vim.fn.stdpath "config")) +  end) + +  a.it("should be able to read lunarvim directories", function() +    local rtp_list = vim.opt.rtp:get() +    assert.truthy(vim.tbl_contains(rtp_list, lvim_runtime_path .. "/lvim")) +    assert.truthy(vim.tbl_contains(rtp_list, lvim_config_path)) +  end) + +  a.it("should be able to run treesitter without errors", function() +    assert.truthy(vim.treesitter.highlighter.active) +  end) + +  a.it("should be able to pass basic checkhealth without errors", function() +    vim.cmd "checkhealth nvim" +    local errmsg = vim.fn.eval "v:errmsg" +    local exception = vim.fn.eval "v:exception" +    assert.equal("", errmsg) -- v:errmsg was not updated. +    assert.equal("", exception) +  end) +end) | 
