diff --git a/lua/neotest-pest/config.lua b/lua/neotest-pest/config.lua index 2b930ce..1e7cc04 100644 --- a/lua/neotest-pest/config.lua +++ b/lua/neotest-pest/config.lua @@ -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" } diff --git a/lua/neotest-pest/init.lua b/lua/neotest-pest/init.lua index 726d4a2..92006e3 100644 --- a/lua/neotest-pest/init.lua +++ b/lua/neotest-pest/init.lua @@ -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 {