klen / nvim-test

A Neovim wrapper for running tests
MIT License
180 stars 27 forks source link

Fix TestNearest with Jest on TSX TS Language #40

Open manning390 opened 1 year ago

manning390 commented 1 year ago

Issue

When you have the treesitter tsx language installed (or gets automatically installed in my case) the :TestNearest fails due to ft_to_lang(filetype) returning tsx and not typescript finding no matching query for the runner. This short circuits and returns {} and runs tests against the whole file.

Solution

Not sure how to run any of the tests locally to ensure there are no breaking changes but looking at the jest runner spec there doesn't appear anything this would break.

manning390 commented 1 year ago

I think the workflow might require a config secret setting? Not sure why it's failing.