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_call_expression
function: (name) @func_name (#match? @func_name "^(test|it)$") 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 )) @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, { return lib.treesitter.parse_positions(path, query, {

View file

@ -2,13 +2,14 @@
tempfile=".test_output.tmp" tempfile=".test_output.tmp"
# Create packpath directory # Create packpath directory
mkdir -p packpath mkdir -p packpath/pack/manual/opt
# Need to clone these plugins to run tests: # Need to clone these plugins to run tests:
git -C packpath/pack/manual/opt/plenary.nvim pull || git clone https://github.com/nvim-lua/plenary.nvim.git ./packpath/pack/manual/opt/plenary.nvim git -C packpath/pack/manual/opt/plenary.nvim pull || git clone https://github.com/nvim-lua/plenary.nvim.git ./packpath/pack/manual/opt/plenary.nvim
git -C packpath/pack/manual/opt/neotest pull || git clone https://github.com/nvim-neotest/neotest.git ./packpath/pack/manual/opt/neotest git -C packpath/pack/manual/opt/neotest pull || git clone https://github.com/nvim-neotest/neotest.git ./packpath/pack/manual/opt/neotest
git -C packpath/pack/manual/opt/neotest-plenary pull || git clone https://github.com/nvim-neotest/neotest-plenary.git ./packpath/pack/manual/opt/neotest-plenary git -C packpath/pack/manual/opt/neotest-plenary pull || git clone https://github.com/nvim-neotest/neotest-plenary.git ./packpath/pack/manual/opt/neotest-plenary
git -C packpath/pack/manual/opt/nvim-treesitter pull || git clone https://github.com/nvim-treesitter/nvim-treesitter.git ./packpath/pack/manual/opt/nvim-treesitter git -C packpath/pack/manual/opt/nvim-treesitter pull || git clone https://github.com/nvim-treesitter/nvim-treesitter.git ./packpath/pack/manual/opt/nvim-treesitter
git -C packpath/pack/manual/opt/nvim-nio pull || git clone https://github.com/nvim-neotest/nvim-nio.git ./packpath/pack/manual/opt/nvim-nio
# Run tests # Run tests
if [[ -n $1 ]]; then if [[ -n $1 ]]; then

View file

@ -4,4 +4,5 @@ set rtp+=./packpath/plenary.nvim
packadd! plenary.nvim packadd! plenary.nvim
packadd! neotest packadd! neotest
packadd! neotest-plenary packadd! neotest-plenary
packadd! nvim-nio
runtime! plugin/plenary.vim runtime! plugin/plenary.vim