mirror of
https://github.com/pnx/neotest-phpunit
synced 2026-06-16 03:54:55 +02:00
Config for parallel testing
This commit is contained in:
parent
e2a4c6b83b
commit
ec3545a773
2 changed files with 13 additions and 1 deletions
|
|
@ -14,9 +14,9 @@ local M = {
|
|||
root_files = { "tests/Pest.php" },
|
||||
filter_dirs = { "vendor" },
|
||||
test_file_suffix = { "Test.php" },
|
||||
autostart_sail = false,
|
||||
sail_executable = "vendor/bin/sail",
|
||||
pest_cmd = "vendor/bin/pest",
|
||||
parallel = 0,
|
||||
},
|
||||
|
||||
_sail_error = false,
|
||||
|
|
@ -34,6 +34,10 @@ function M.env.sail_enabled()
|
|||
return M.sail_available()
|
||||
end
|
||||
|
||||
function M.env.is_parallel()
|
||||
return M('parallel') > 0
|
||||
end
|
||||
|
||||
function M.env.pest_cmd()
|
||||
if M('sail_enabled') then
|
||||
return { "vendor/bin/sail", "bin", "pest" }
|
||||
|
|
|
|||
|
|
@ -137,6 +137,14 @@ function NeotestAdapter.build_spec(args)
|
|||
debug("Position type:", position.type)
|
||||
end
|
||||
|
||||
if config('is_parallel') then
|
||||
command = vim.tbl_flatten({
|
||||
command,
|
||||
"--parallel",
|
||||
config('parallel'),
|
||||
})
|
||||
end
|
||||
|
||||
debug("Command:", command)
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue