Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(run): augment args #437

Merged
merged 1 commit into from
Jul 13, 2024
Merged

feat(run): augment args #437

merged 1 commit into from
Jul 13, 2024

Conversation

rcarriga
Copy link
Collaborator

Allow users to augment the arguments to all tests being run from a singular function.

local nio = require("nio")
neotest.setup({
  run = {
    augment = function(tree, args)
      local name = nio.ui.input({ prompt = "What is your name?" })

      args.env = { USER_NAME = name }

      return args
    end,
  },
})

See #431

Allow users to augment the arguments to all tests being run from a
singular function.

```lua
local nio = require("nio")
neotest.setup({
  run = {
    augment = function(tree, args)
      local name = nio.ui.input({ prompt = "What is your name?" })

      args.env = { USER_NAME = name }

      return args
    end,
  },
})
```

See #431
@rcarriga rcarriga merged commit 32ff2ac into master Jul 13, 2024
7 checks passed
@rcarriga rcarriga deleted the feat/run/augment-args branch July 13, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant