File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 96
96
--- @param file_path string Absolute file path
97
97
--- @return neotest.Tree | nil
98
98
function NeotestAdapter .discover_positions (path )
99
+ if not NeotestAdapter .is_test_file (path ) then
100
+ return nil
101
+ end
102
+
99
103
local query = [[
100
104
((class_declaration
101
105
name: (name) @namespace.name (#match? @namespace.name "Test")
Original file line number Diff line number Diff line change @@ -60,9 +60,10 @@ local function make_outputs(test, output_file)
60
60
local test_id = test_attr .file .. separator .. test_attr .line
61
61
logger .info (" PHPUnit id:" , { test_id })
62
62
63
+ local classname = test_attr .classname or test_attr .class
63
64
local test_output = {
64
65
status = " passed" ,
65
- short = string.upper (test_attr . classname ) .. " \n -> " .. " PASSED" .. " - " .. test_attr .name ,
66
+ short = string.upper (classname ) .. " \n -> " .. " PASSED" .. " - " .. test_attr .name ,
66
67
output_file = output_file ,
67
68
}
68
69
You can’t perform that action at this time.
0 commit comments