From e67dd4caada39f4795c29b1d65ebf95139ea91ad Mon Sep 17 00:00:00 2001 From: Akin Sowemimo <22454918+akinsho@users.noreply.github.com> Date: Thu, 16 Jun 2022 04:26:08 +0200 Subject: [PATCH] docs(README): document extra args --- README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9b668be..7b31b25 100644 --- a/README.md +++ b/README.md @@ -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