Skip to content

Is it possible to run a task before running a neotest run? #92

Answered by stevearc
carlosflorencio asked this question in Q&A
Discussion options

You must be logged in to vote

Should be! There's a component for specifying dependencies for a task, so all you need to do is attach that to your neotest task. There's two ways to do this:

  1. Add it to the default_neotest component alias
require("overseer").setup({
  component_aliases = {
    default_neotest = {
      { "dependencies", task_names = {
        { "shell", cmd = "sleep 4" },
      } },
      "default",
    },
  },
})
  1. Pass it in to the neotest strategy spec
require("neotest").setup({
  strategies = {
    overseer = {
      components = {
        { "dependencies", task_names = {
          { "shell", cmd = "sleep 4" },
        } },
        "default_neotest",
      },
    },
  },
})

For this second option, y…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@carlosflorencio
Comment options

Answer selected by carlosflorencio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants