mirror of
https://github.com/pnx/neotest-phpunit
synced 2026-06-18 04:10:01 +02:00
initial stab at a dynamic config
This commit is contained in:
parent
5071eff864
commit
31e410341b
2 changed files with 51 additions and 14 deletions
33
lua/neotest-pest/config.lua
Normal file
33
lua/neotest-pest/config.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
local M = {}
|
||||
|
||||
M.enable_sail = function()
|
||||
return vim.fn.filereadable("vendor/bin/sail") == 1
|
||||
end
|
||||
|
||||
M.get_pest_cmd = function()
|
||||
local binary = "pest"
|
||||
|
||||
if vim.fn.filereadable("vendor/bin/pest") == 1 then
|
||||
binary = "vendor/bin/pest"
|
||||
end
|
||||
|
||||
return binary
|
||||
end
|
||||
|
||||
M.get_env = function()
|
||||
return {}
|
||||
end
|
||||
|
||||
M.get_root_ignore_files = function()
|
||||
return {}
|
||||
end
|
||||
|
||||
M.get_root_files = function()
|
||||
return { "tests/Pest.php" }
|
||||
end
|
||||
|
||||
M.get_filter_dirs = function()
|
||||
return { ".git", "node_modules", "vendor" }
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue