mirror of
https://github.com/pnx/neotest-phpunit
synced 2026-06-18 04:10:01 +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" },
|
root_files = { "tests/Pest.php" },
|
||||||
filter_dirs = { "vendor" },
|
filter_dirs = { "vendor" },
|
||||||
test_file_suffix = { "Test.php" },
|
test_file_suffix = { "Test.php" },
|
||||||
autostart_sail = false,
|
|
||||||
sail_executable = "vendor/bin/sail",
|
sail_executable = "vendor/bin/sail",
|
||||||
pest_cmd = "vendor/bin/pest",
|
pest_cmd = "vendor/bin/pest",
|
||||||
|
parallel = 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
_sail_error = false,
|
_sail_error = false,
|
||||||
|
|
@ -34,6 +34,10 @@ function M.env.sail_enabled()
|
||||||
return M.sail_available()
|
return M.sail_available()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.env.is_parallel()
|
||||||
|
return M('parallel') > 0
|
||||||
|
end
|
||||||
|
|
||||||
function M.env.pest_cmd()
|
function M.env.pest_cmd()
|
||||||
if M('sail_enabled') then
|
if M('sail_enabled') then
|
||||||
return { "vendor/bin/sail", "bin", "pest" }
|
return { "vendor/bin/sail", "bin", "pest" }
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,14 @@ function NeotestAdapter.build_spec(args)
|
||||||
debug("Position type:", position.type)
|
debug("Position type:", position.type)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if config('is_parallel') then
|
||||||
|
command = vim.tbl_flatten({
|
||||||
|
command,
|
||||||
|
"--parallel",
|
||||||
|
config('parallel'),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
debug("Command:", command)
|
debug("Command:", command)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue