Neovim for Minimalists — Test-Driven Development
In this article, we will use Neovim Lua APIs to automate the unit testing process, without using any plugins.
This article is part of the Neovim for Minimalists series.
The Neovim configuration files are available in this repository.
Getting Started
In the beginner series, we use vim-test
, Neotest
, nvim-dap
, and overseer.nvim
to automate the testing and debugging process.
For those who are not familiar with Lua, you can go through these articles to set up test-driven development workflow in Neovim.
- Neovim for Beginners — Testing
- Neovim for Beginners — Testing (Part 2)
- Neovim For Beginners — Test Debugging and Automation
Using the Neovim Tree-sitter and Lua APIs, we can easily set up a test-driven development workflow, without any plugins.
We will use Python and the built-in unittest framework as an example to develop the testing workflow, as shown below.
PyTestAll
Using the :PyTestAll
command, we can unit test all the test scenarios.