This plugin provides aFoundryadapter for theNeotestframework.
Credits toneotest-vitestandvscode-foundry-test-runner.
demo.mp4
{
'nvim-neotest/neotest',
dependencies={
...,
'llllvvuu/neotest-foundry',
}
config={
...,
adapters={
require('neotest-foundry')
}
}
}
Defaults:
...
adapters={
require('neotest-foundry')({
foundryCommand="forge test",--string | function
foundryConfig=nil,--string | function
env={},--table | function
cwd=function()returnlib.files.match_root_pattern("foundry.toml")end,--string | function
filterDir=function(name)
return(
name~="node_modules"
andname~="cache"
andname~="out"
andname~="artifacts"
andname~="docs"
andname~="doc"
--and name ~= "lib"
)
end,
})
}
If you start Neovim from the contracts directory instead of the monorepo root it should work. e.g.cd contracts/core && nvim
./scripts/test