Neotest adapter for Bun test runner.
Based on neotest-jest
Using lazy.nvim
{
'nvim-neotest/neotest',
requires = {
...,
'arthur944/neotest-bun',
}
config = function()
require("neotest").setup({
adapters = {
require("neotest-bun"),
},
})
end,
}
Make sure you have the appropriate treesitter
language parsers installed otherwise no tests will be found:
:TSInstall javascript
See neotest's documentation for more information on how to run tests. Just make sure you have bun installed and in your path.
There is currently nothing to configure. Test files will be discovered based on these patterns:
%.test%.ts$
%.test%.tsx$
%.spec%.ts$
%.spec%.tsx$
%.test%.js$
%.test%.jsx$
%.spec%.js$
%.spec%.jsx$
The root directory is determined by where a package.json
file is found. If you have a bunfig.toml file there, it will be used when running tests.
That's not suppored right now, PRs welcome.
Feel free to raise an issue or reach out to me on X the everything app