nvim-neotest / neotest

An extensible framework for interacting with tests within NeoVim.
MIT License
2.2k stars 107 forks source link

feat(run): augment args #437

Closed rcarriga closed 1 month ago

rcarriga commented 1 month ago

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