1
0
Fork 0
mirror of https://github.com/pnx/neotest-phpunit synced 2026-06-16 03:54:55 +02:00

Update tests of the plugin itself

This commit is contained in:
V13Axel 2024-06-11 11:02:08 -04:00
parent 9337acfb57
commit 6ba782610d
3 changed files with 12 additions and 2 deletions

View file

@ -82,8 +82,16 @@ function NeotestAdapter.discover_positions(path)
((function_call_expression
function: (name) @func_name (#match? @func_name "^(test|it)$")
arguments: (arguments . (argument (string (string_content) @test.name)))
arguments: (arguments . (argument (_ (string_content) @test.name)))
)) @test.definition
((expression_statement
(member_call_expression
object: (#eq? @test.definition)
name: (name) @member_call_name (#match? @member_call_name "^(with)$")
arguments: (arguments . (argument (array_creation_expression (array_element_initializer (array_creation_expression (array_element_initializer (_) @test.parameter .) )))))
)
))
]]
return lib.treesitter.parse_positions(path, query, {