From 6ccc78197b2b295330e30b8becc0ef6937983bcb Mon Sep 17 00:00:00 2001 From: MisanthropicBit Date: Fri, 16 Feb 2024 21:01:05 +0100 Subject: [PATCH] Use 'function_expression' instead of 'function' --- lua/neotest-mocha/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/neotest-mocha/init.lua b/lua/neotest-mocha/init.lua index bdc2940..73c4d67 100644 --- a/lua/neotest-mocha/init.lua +++ b/lua/neotest-mocha/init.lua @@ -112,14 +112,14 @@ function Adapter.discover_positions(file_path) ; Matches: `it('test') / specify('test')` ((call_expression function: (identifier) @func_name (#any-of? @func_name "it" "specify") - arguments: (arguments [(template_string) @test.name (string (string_fragment) @test.name)] [(arrow_function) (function)]) + arguments: (arguments [(template_string) @test.name (string (string_fragment) @test.name)] [(arrow_function) (function_expression)]) )) @test.definition ; Matches: `it.only('test') / specify.only('test')` ((call_expression function: (member_expression object: (identifier) @func_name (#any-of? @func_name "it" "specify") ) - arguments: (arguments [(template_string) @test.name (string (string_fragment) @test.name)] [(arrow_function) (function)]) + arguments: (arguments [(template_string) @test.name (string (string_fragment) @test.name)] [(arrow_function) (function_expression)]) )) @test.definition ]]