docs(tests): fix outdated instructions (#422)

This commit is contained in:
Saltaformajo 2023-01-06 16:21:55 +02:00 committed by GitHub
parent 1252cb3344
commit bcf897bfca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,11 +34,21 @@ The test **some test** checks that a functions output is as expected based on th
# Running tests
Run the test using `:PlenaryBustedTest <file>`.
Run the test using `:PlenaryBustedFile <file>`.
```vimscript
" Run the test in the current buffer
:PlenaryBustedTest %
:PlenaryBustedFile %
" Run all tests in the directory "tests/plenary/"
:PlenaryBustedDirectory tests/plenary/
```
Or you can run tests in headless mode to see output in terminal:
```bash
# run all tests in terminal
cd plenary.nvim
nvim --headless -c 'PlenaryBustedDirectory tests'
```
# mocking with luassert