Skip to content

Commit

Permalink
docs(README): document extra args
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsho committed Jun 16, 2022
1 parent e7dab88 commit e67dd4c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,31 @@ use({

_NOTE_: all usages of `require('neotest').run.run` can be mapped to a command in your config (this is not included and should be done by the user)

### Test single function
#### Test single function

To test a single test hover over the test and run `require('neotest').run.run()`

### Test File
#### Test file

To test a file run `require('neotest').run.run(vim.fn.expand('%'))`

### Test Directory
#### Test directory

To test a directory run `require('neotest').run.run("path/to/directory")`

### Test Suite
#### Test suite

To test the full test suite run `require('neotest').run.run("path/to/root_project")`
e.g. `require('neotest').run.run(vim.fn.getcwd())`, presuming that vim's directory is the same as the project root

#### Additional arguments

Additional arguments for the go test command can be sent using the `extra_args` field e.g.

```lua
require('neotest').run.run({path, extra_args = {"-race"}})
```

## Contributing

This project is maintained by the nvim golang community. Please raise a PR if you are interested in adding new functionality or fixing any bugs
Expand Down

0 comments on commit e67dd4c

Please sign in to comment.