Skip to content

Commit

Permalink
fix: remove test suite AST-detection (still in POC) (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil authored Jul 3, 2024
1 parent ee3156a commit 3766f89
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lua/neotest-golang/ast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3766f89

Please sign in to comment.