From 3766f899de542195ac1d8d0299f6979a15457d20 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Wed, 3 Jul 2024 16:55:30 +0200 Subject: [PATCH] fix: remove test suite AST-detection (still in POC) (#85) --- lua/neotest-golang/ast.lua | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lua/neotest-golang/ast.lua b/lua/neotest-golang/ast.lua index c21f0a0..595bdeb 100644 --- a/lua/neotest-golang/ast.lua +++ b/lua/neotest-golang/ast.lua @@ -27,16 +27,6 @@ function M.detect_tests(file_path) name: (field_identifier) @test.name (#match? @test.name "^(Test|Example)")) @test.definition ]] - local receiver_method = [[ - ; query for receiver method, to be used as test suite namespace - (method_declaration - receiver: (parameter_list - (parameter_declaration - ; name: (identifier) - type: (pointer_type - (type_identifier) @namespace.name )))) @namespace.definition - ]] - local table_tests = [[ ;; query for list table tests (block @@ -137,7 +127,7 @@ function M.detect_tests(file_path) (#eq? @test.key.name @test.key.name1)))))))) ]] - local query = test_function .. test_method .. receiver_method .. table_tests + local query = test_function .. test_method .. table_tests local opts = { nested_tests = true } ---@type neotest.Tree