diff --git a/README.md b/README.md index 8bb70bd..5965a7b 100644 --- a/README.md +++ b/README.md @@ -5,29 +5,59 @@ This plugin provides a [Vitest](https://vitest.dev/) adapter for the [Neotest](h Credits to [neotest-jest](https://github.com/haydenmeade/neotest-jest) ## Known issues -- ~~Wrong error location on collecting results - (this is related to Vitest reporting issue)~~ (solved by Vitest 0.23.0) + - test.each is currently not well supported (WIP) ## How to install it + +### Lazy + +```lua +{ + "nvim-neotest/neotest", + dependencies = { + ..., + "marilari88/neotest-vitest", + }, + config = function() + require("neotest").setup({ + ..., + adapters = { + require("neotest-vitest"), + } + }) + end, +} ``` + +### Packer + +```lua use({ - 'rcarriga/neotest', + "nvim-neotest/neotest", requires = { ..., - 'marilari88/neotest-vitest', + "marilari88/neotest-vitest", } config = function() - require('neotest').setup({ + require("neotest").setup({ ..., adapters = { - require('neotest-vitest') + require("neotest-vitest") } }) end }) ``` +Make sure you have Treesitter installed with the right language parser installed + +``` +:TSInstall javascript +``` + ## Usage + ![usage preview](https://user-images.githubusercontent.com/32909388/185812063-d05d9cc7-b9aa-43ed-915b-cf156e3f0c52.gif) See neotest's documentation for more information on how to run tests.