pub const TEST_ANNOTATION_QUERY: &str = "(method_declaration\n\t(modifiers\n        (annotation\n            name: (_) @annotation\n            arguments: (_)\n        )\n    )\n    name: (_) @name\n)\n\n(method_declaration\n\t(modifiers\n\t(marker_annotation\n    \tname: (_) @annotation)\n    )\n    name: (_) @name\n    (#eq? @annotation \"Test\")\n)";
Expand description

Tree-sitter query that returns name of the JUnit @Test annotated methods

  • name: name of the test method