rest.nvim icon indicating copy to clipboard operation
rest.nvim copied to clipboard

how to run the tests ?

Open teto opened this issue 3 years ago • 2 comments

I can run the tests manually but didnt find a way to run them automatically. Running them on CI would make merging PRs less dangerous . @NTBBloodbath how do you run them ?

teto avatar Aug 22 '22 12:08 teto

Hmm I used to run them one by one manually. Maybe we could expose a Lua function to run a whole tests file(s) so we can run them all in a shot for this purpose?

The thing is that we would also have to return an exit code other than 0 in case a test fails, right? If so, would using an os.exit(code) suffice?

NTBBloodbath avatar Aug 22 '22 19:08 NTBBloodbath

anything that can detect an error, and ideally which one. neovim uses busted to run tests and plenary has also some helpers to run tests.

teto avatar Sep 01 '22 21:09 teto

I am looking into this. Seems like I will need to fork busted though :)

teto avatar Nov 22 '22 21:11 teto

I've created https://github.com/rest-nvim/rest.nvim/pull/159 which I hope can help people add some tests.

teto avatar Dec 12 '22 16:12 teto

this is now documented in READMe

teto avatar Dec 27 '22 00:12 teto