mirror of
https://github.com/pnx/neotest-phpunit
synced 2026-06-16 03:54:55 +02:00
Update readme to include new config options
This commit is contained in:
parent
20ebc86066
commit
3e65ff5a13
3 changed files with 74 additions and 28 deletions
|
|
@ -12,10 +12,9 @@ local M = {
|
|||
env = {
|
||||
root_ignore_files = {},
|
||||
root_files = { "tests/Pest.php" },
|
||||
filter_dirs = { "vendor" },
|
||||
test_file_suffix = { "Test.php" },
|
||||
ignore_dirs = { "vendor", "node_modules" },
|
||||
test_file_suffixes = { "Test.php" },
|
||||
sail_executable = "vendor/bin/sail",
|
||||
pest_cmd = "vendor/bin/pest",
|
||||
parallel = 0,
|
||||
compact = false,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ end
|
|||
---@param root string Root directory of project
|
||||
---@return boolean True when matching
|
||||
function NeotestAdapter.filter_dir(name, rel_path, root)
|
||||
for _, filter_dir in ipairs(config("filter_dirs")) do
|
||||
for _, filter_dir in ipairs(config("ignore_dirs")) do
|
||||
if name == filter_dir then return false end
|
||||
end
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ end
|
|||
---@param file_path string
|
||||
---@return boolean
|
||||
function NeotestAdapter.is_test_file(file_path)
|
||||
for _, suffix in ipairs(config("test_file_suffix")) do
|
||||
for _, suffix in ipairs(config("test_file_suffixes")) do
|
||||
if vim.endswith(file_path, suffix) then return true end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue