1
0
Fork 0
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:
V13Axel 2024-02-17 17:05:31 -05:00
parent e2a4c6b83b
commit ec3545a773
2 changed files with 13 additions and 1 deletions

View file

@ -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" }

View file

@ -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 {