5216378d3cb35e2fb06d2fa4491fe012bdfb3666
All checks were successful
tests / test (push) Successful in 9s
test-samurai-jest-runner.nvim
Jest.js runner for test-samurai.nvim.
Main plugin: https://gitea.mschirmer.com/m13r/test-samurai.nvim
Features
- Detects Jest test files (
*.test.*,*.spec.*). - Finds nearest
test/itwithindescribeblocks. - Builds
npx jestcommands for nearest, file, all, and failed-only runs. - Streams results via a custom Jest reporter using
onTestCaseResult. - Uses
--testLocationInResultsfor Quickfix and<leader>osupport.
Installation (lazy.nvim)
{
"m13r/test-samurai.nvim",
dependencies = {
"m13r/test-samurai-jest-runner.nvim",
},
config = function()
require("test-samurai").setup({
runners = {
require("test-samurai-jest-runner"),
},
})
end,
}
Local Development (lazy.nvim)
{
"m13r/test-samurai.nvim",
dependencies = {
{
"test-samurai-jest-runner.nvim",
dir = "/absolute/path/to/test-samurai-jest-runner.nvim",
},
},
config = function()
require("test-samurai").setup({
runners = {
require("test-samurai-jest-runner"),
},
})
end,
}
Usage
Use the standard test-samurai.nvim commands (e.g. TSamNearest, TSamFile, TSamAll, TSamFailedOnly).
Notes
- The reporter lives at
reporter/test_samurai_jest_reporter.jsand is loaded via--reporters. - Test names are reported as
Describe/Itfor grouping in the listing.
Description
Languages
Lua
93.4%
JavaScript
6.4%
Shell
0.2%