Testing
September 6, 2022 · View on GitHub
- The test suite includes unit and integration tests and depends on
plenary.nvim - The default
test/minimal.vim(passed to the instantiation of Neovim with-u) assumes that you've installedplenary.nvimone directory above where this project lives, since the test suite modifiesrtpas follows:
...
set rtp+=../plenary.nvim
...
- Ensure that your plugin directory structure looks something like the following:
.
├── plenary.nvim
└── null-ls
Suite
- Run
make testin the root of the project to run the test suite.
Single-file tests
- Run
FILE=test/spec/file_spec.lua make test-fileto run tests from a specific file, for example:
FILE=test/spec/e2e_spec.lua make test-file