Skip to content

Commit

Permalink
docs: add some notes
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Jan 24, 2025
1 parent be3f0b2 commit e0f907a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/bootstrap.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
local M = {}

--- Initialize the test environment.
--- Thie file will run once before attempting to run PlenaryBustedDirectory.
function M.init()
vim.cmd([[set runtimepath=$VIMRUNTIME]]) -- reset, otherwise it contains all of $PATH
print("Runtime path: " .. vim.inspect(vim.opt.runtimepath:get()))
Expand All @@ -8,6 +10,7 @@ function M.init()
local site_dir = ".tests/all/site"
vim.opt.packpath = { site_dir } -- set packpath to the site directory

-- Clone down plugins, add to runtimepath
local plugins = {
["plenary.nvim"] = { url = "https://github.com/nvim-lua/plenary.nvim" },
["nvim-nio"] = { url = "https://github.com/nvim-neotest/nvim-nio" },
Expand All @@ -16,7 +19,6 @@ function M.init()
},
neotest = { url = "https://github.com/nvim-neotest/neotest" },
}

for plugin, data in pairs(plugins) do
local plugin_path = site_dir .. "/pack/deps/start/" .. plugin
if vim.fn.isdirectory(plugin_path) ~= 1 then
Expand All @@ -31,12 +33,12 @@ function M.init()
print("Runtime path: " .. vim.inspect(vim.opt.runtimepath:get()))
print("Package path: " .. package.path)

-- test availability
-- Check availability
require("plenary")
require("neotest")
require("nvim-treesitter")

-- Installed go parser, if not already installed
-- Install go parser, if not already installed
require("nvim-treesitter.configs").setup({
ensure_installed = { "go" },
auto_install = true,
Expand Down
1 change: 1 addition & 0 deletions tests/minimal_init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local M = {}

--- Initialize before running each test.
function M.init()
vim.cmd([[set runtimepath=$VIMRUNTIME]]) -- reset, otherwise it contains all of $PATH
vim.opt.swapfile = false
Expand Down

0 comments on commit e0f907a

Please sign in to comment.