Closed richardmarbach closed 1 year ago
Awesome thank you. Does this resolve #27 too?
It doesn't. It seems the issue with this query
((call
method: (identifier) @func_name (#match? @func_name "^(describe|context|feature)$")
arguments: (argument_list (_) @namespace.name)
)) @namespace.definition
is that the arguments isn't present. Removing the arguments and using the @func_name
as the @namespace.name
for the test name and checking if there's a block immediatly following the identifier does the trick. I've opened a PR with the fix: https://github.com/olimorris/neotest-rspec/pull/37
Thanks for the great plugin!
I've run across a case that's not detected yet. It's possible to define "one-liner" tests with a multi-line block:
I've added a treesitter query to detect this case.