olimorris / neotest-rspec

🧪 Neotest adapter for RSpec. Works in Docker containers too
MIT License
90 stars 26 forks source link

Tests without description not found #50

Closed eric-unger closed 1 year ago

eric-unger commented 1 year ago

I have some tests that do not have a description a very simple example to recreate below, these are not found in the buffer or the summary. I'm using LazyVim not sure if I've missed something in the configuration.

describe 'Test' do
  it do 
    expect(true).to be(true)
  end
end

image

eric-unger commented 1 year ago

I started looking into tree-sitter recently, would adding the following query support the outcome?

((call
  method: (identifier) @func_name (#eq? @func_name "it")
  block: (do_block (_) @test.name) 
)) @test.definition
olimorris commented 1 year ago

I'd recommend using Treesitter Playground to test any queries out and then running make test to see if the tests pass.

eric-unger commented 1 year ago

Thanks, I used https://github.com/nvim-treesitter/playground to test the query