nvim-test icon indicating copy to clipboard operation
nvim-test copied to clipboard

Fix TestNearest with Jest on TSX TS Language

Open manning390 opened this issue 1 year ago • 1 comments

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

  • Add tsx to list of languages jest runner

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 avatar Jul 07 '23 18:07 manning390