Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: make sure we have external nio when running tests #65

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
NEOTEST_DIR = misc/neotest
NIO_DIR = misc/nio
PLENARY_DIR = misc/plenary
TREESITTER_DIR = misc/treesitter
TEST_DIR = tests/unit

test: test_core test_rspec

test_core: $(NEOTEST_DIR) $(PLENARY_DIR) $(TREESITTER_DIR)
test_core: $(NEOTEST_DIR) $(NIO_DIR) $(PLENARY_DIR) $(TREESITTER_DIR)
nvim --headless --clean \
-u tests/minimal_init.lua \
-c "PlenaryBustedDirectory $(TEST_DIR)/core { minimal_init = 'tests/minimal_init.lua' }"

test_rspec: $(NEOTEST_DIR) $(PLENARY_DIR) $(TREESITTER_DIR)
test_rspec: $(NEOTEST_DIR) $(NIO_DIR) $(PLENARY_DIR) $(TREESITTER_DIR)
nvim --headless --clean \
-u tests/minimal_init.lua \
-c "PlenaryBustedDirectory $(TEST_DIR)/rspec { minimal_init = 'tests/minimal_init.lua' }"
Expand All @@ -19,6 +20,10 @@ $(NEOTEST_DIR):
git clone --depth=1 --no-single-branch https://github.com/nvim-neotest/neotest $(NEOTEST_DIR)
@rm -rf $(NEOTEST_DIR)/.git

$(NIO_DIR):
git clone --depth=1 --no-single-branch https://github.com/nvim-neotest/nvim-nio $(NIO_DIR)
@rm -rf $(NIO_DIR)/.git

$(PLENARY_DIR):
git clone --depth=1 --branch v0.1.3 https://github.com/nvim-lua/plenary.nvim $(PLENARY_DIR)
@rm -rf $(PLENARY_DIR)/.git
Expand Down
1 change: 1 addition & 0 deletions tests/minimal_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ vim.bo.swapfile = false

vim.cmd([[set runtimepath+=.]])
vim.cmd([[set runtimepath+=./misc/neotest]])
vim.cmd([[set runtimepath+=./misc/nio]])
vim.cmd([[set runtimepath+=./misc/plenary]])
vim.cmd([[set runtimepath+=./misc/treesitter]])

Expand Down
Loading