Basic framework for testing Neovim plugins
  • Lua 85.1%
  • Shell 14.9%
Find a file
2025-11-01 16:57:40 +01:00
lua Add -s option to output on single line 2025-08-06 18:02:49 +02:00
.gitignore Uncrowd .gitignore 2025-03-09 16:56:52 +01:00
.luarc.json First commit 2025-03-02 09:49:25 +01:00
.stylua.toml First commit 2025-03-02 09:49:25 +01:00
LICENSE First commit 2025-03-02 09:49:25 +01:00
README.md Update link locations 2025-11-01 16:57:40 +01:00
tsst Add -s option to output on single line 2025-08-06 18:02:49 +02:00

tsst.nvim

Basic framework for testing Neovim plugins.

Projects that use tsst should define test modules in ./tests/*_test.lua and have a copy of tsst.nvim in the same directory, e.g.

tests
├── foo_test.lua
├── bar_test.lua
└── tsst.nvim

The basic structure of a test module looks like this:

M = {}

local tsst = require 'tsst'

M.before_each = function()
    -- ...
end

M.testcases = {}

table.insert(M.testcases, {
    desc = 'Run a test',
    fn = function()
        -- ...
    end,
})

return M

To run all tests:

tests/tsst.nvim/tsst

To run a specific module and debug failures:

tests/tsst.nvim/tsst -d tests/foo_test.lua

See brk.nvim and refmt.nvim for more in depth examples.