neotest-jest icon indicating copy to clipboard operation
neotest-jest copied to clipboard

feat: After updating `nvim-tresitter` to 0.9.2 doesn't detect tests in TypeScript

Open artur-ptaszek-mck opened this issue 1 year ago • 13 comments

Any simple test case doesn't work with the newest version of treesitter. It simply shows No tests found.

Downgrading it to 0.9.1 helped.

artur-ptaszek-mck avatar Feb 06 '24 07:02 artur-ptaszek-mck

Having the same issue here, and indeed, downgrading Treesitter to v0.9.1 works, but everything else on my setup just crashes randomly.

carlos-algms avatar Feb 06 '24 19:02 carlos-algms

Same here! I've just disabled neotest-jest for now. For the record, the neotest logs are printing this:

ARN | 2024-02-12T22:51:36Z+0100 | ...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:161 | CHILD | Error in remote call ...im/0.9.5/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 494 for language typescript
stack traceback:
	[C]: in function '_ts_parse_query'
	...im/0.9.5/share/nvim/runtime/lua/vim/treesitter/query.lua:259: in function 'parse_query'
	...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:104: in function 'normalise_query'
	...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:161: in function 'parse_positions_from_string'
	...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:207: in function 'func'
	...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:153: in function <...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:152>
	[C]: in function 'xpcall'
	...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:152: in function <...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:151>

codeeno avatar Feb 12 '24 21:02 codeeno

thanks, i fixed mine also by downgrading treesitter to 0.9.1 i was wondering why my tests could not be run would help if I could, but is there any plan this will be fixed?

edward-s avatar Feb 13 '24 05:02 edward-s

Same problem, except that when I reverted back to 0.9.1, lots of issues with syntax highlighting, etc. It's pretty unusable until this is fixed.

edward-r avatar Feb 14 '24 19:02 edward-r

@edward-r lol, we have similar username! i too had to uninstall neotest-jest cos treesitter 0.9.1 is giving me lots of errors is there an alternative to neotest-jest?

edward-s avatar Feb 15 '24 09:02 edward-s

I still have the same issue, even after the merge of #100. And as the edwards mentioned, I can't downgrade treesitter because it breaks other things for me. I'd be willing to look into this further myself, but I don't really know where to start.

danielwikander avatar Feb 21 '24 14:02 danielwikander

Thanks for this plugin and eco system. I am having the same issues in lunarvim + treesitter 0.9.5. I downgraded neotest-jest to a previous commit (c2118446d770fedb360a91b1d91a7025db86d4f1) which works as expected even with treesitter @0.9.5. ~~All that said, now 0.9.5 is causing problems elsewhere.~~ Needed to run TSUpdate.

andrew-t-james-core avatar Feb 21 '24 17:02 andrew-t-james-core

Thanks for this plugin and eco system. I am having the same issues in lunarvim + treesitter 0.9.5. I downgraded neotest-jest to a previous commit (c211844) which works as expected even with treesitter @0.9.5. ~All that said, now 0.9.5 is causing problems elsewhere.~ Needed to run TSUpdate.

Just tried with commit (c211844) too, doesn't work for me :/

I'm using typescript-tools by the way, not sure if that could have an effect on this.

danielwikander avatar Feb 22 '24 07:02 danielwikander

I'm using typescript-tools as well, and it was completely fixed after #100 Even the "summary" is listing all the tests on the file.

carlos-algms avatar Feb 22 '24 08:02 carlos-algms

To me everything works fine after fix.

artur-ptaszek-mck avatar Feb 22 '24 11:02 artur-ptaszek-mck

@carlos-algms I have the opposite experience (using ts-tools as well). I was not able to see the summary nor was I able to run any tests.

This is what the summary looks like when focused on a test if I use the latest version of the plugin. image

This is what it looks like on the previous commit. image

andrew-t-james-core avatar Feb 22 '24 16:02 andrew-t-james-core

Downgrading to https://github.com/nvim-neotest/neotest-jest/commit/c2118446d770fedb360a91b1d91a7025db86d4f1 works for me as well

jakubreron avatar Feb 29 '24 05:02 jakubreron

c211844

This worked for me also

ValiTTG avatar Jun 11 '24 02:06 ValiTTG