nvim-neotest / neotest

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

[BUG] : Cypress - `neotest-nvim-test` only works when all other `adapters` are disabled. #356

Closed ls-devs closed 5 months ago

ls-devs commented 5 months ago

NeoVim Version NVIM v0.10.0-dev-2255+g4c9119461 Build type: RelWithDebInfo LuaJIT 2.1.1706708390

Describe the bug Actually, when I require all the adapters in my config, I got No Tests found when trying to use neotest for Cypress tests. But it works when I disable all of the adapters except neotest-nvim-test.

To Reproduce

vim.opt.runtimepath:remove(vim.fn.expand("~/.config/nvim"))
vim.opt.packpath:remove(vim.fn.expand("~/.local/share/nvim/site"))

local lazypath = "/tmp/lazy/lazy.nvim"

if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end

vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
  "nvim-neotest/neotest",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-treesitter/nvim-treesitter",
    "antoinemadec/FixCursorHold.nvim",
    "nvim-treesitter/nvim-treesitter",
    "nvim-neotest/neotest-jest",
    "marilari88/neotest-vitest",
    "rouge8/neotest-rust",
    "alfaix/neotest-gtest",
    "rcasia/neotest-bash",
    "thenbe/neotest-playwright",
    {
      "nvim-neotest/neotest-vim-test",
      dependencies = {
        "vim-test/vim-test",
      },
    },
    {
      "folke/neodev.nvim",
      opts = {
        {
          library = {
            enabled = true,
            runtime = true,
            types = true,
            plugins = true,
          },
          setup_jsonls = true,
          override = function(root_dir, options) end,
          lspconfig = true,
          pathStrict = true,
        },
      },
    },
  },
  config = function()
    require("nvim-treesitter.configs").setup({
      ensure_installed = {
        "lua",
        "javascript",
        "typescript",
        "tsx",
        "json",
        "c",
        "java",
        "astro",
        "vue",
        "rust",
        "cpp",
        "bash",
      },
    })

    require("neotest").setup({
      adapters = {
        require("neotest-jest")({
          jestCommand = "npm test --",
          jestConfigFile = "custom.jest.config.ts",
          env = { CI = true },
          cwd = function(path)
            return vim.fn.getcwd()
          end,
        }),
        require("neotest-vitest"),
        require("neotest-rust")({
          args = { "--no-capture" },
          dap_adapter = "lldb",
        }),
        require("neotest-gtest").setup({}),
        require("neotest-playwright").adapter({
          options = {
            persist_project_selection = true,
            enable_dynamic_test_discovery = true,
          },
        }),
        require("neotest-vim-test")({ ignore_filetypes = { "jest", "rust", "c", "cpp" } }),
      },
      discovery = {
        filter_dir = function(name, rel_path, root)
          return name ~= "node_modules"
        end,
      },
    })
  end,
})

Steps to reproduce the behavior:

  1. Go to cypress test file
  2. Try to run test / toggle summary
  3. No Tests found

Example test file :

describe('template spec', () => {
  it('passes', () => {
    cy.visit('https://example.cypress.io')
  })
})

Expected behavior

Find / Run and show tests in summary

Logs

INFO | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/config/init.lua:389 | Configuration complete
DEBUG | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/config/init.lua:390 | User config {
  adapters = { {
      build_position = <function 1>,
      build_spec = <function 2>,
      discover_positions = <function 3>,
      filter_dir = <function 4>,
      is_test_file = <function 5>,
      name = "neotest-jest",
      results = <function 6>,
      root = <function 7>,
      <metatable> = {
        __call = <function 8>
      }
    }, {
      build_spec = <function 9>,
      discover_positions = <function 10>,
      filter_dir = <function 11>,
      is_test_file = <function 12>,
      name = "neotest-vitest",
      results = <function 13>,
      root = <function 14>,
      <metatable> = {
        __call = <function 15>
      }
    }, {
      build_spec = <function 16>,
      discover_positions = <function 17>,
      filter_dir = <function 18>,
      is_test_file = <function 19>,
      name = "neotest-rust",
      results = <function 20>,
      root = <function 21>,
      <metatable> = {
        __call = <function 22>
      }
    }, {
      build_spec = <function 23>,
      discover_positions = <function 24>,
      filter_dir = <function 25>,
      is_test_file = <function 26>,
      name = "neotest-gtest",
      results = <function 27>,
      root = <function 28>,
      setup = <function 29>
    }, {
      build_spec = <function 30>,
      data = {},
      discover_positions = <function 31>,
      filter_dir = <function 32>,
      is_test_file = <function 33>,
      name = "neotest-playwright",
      options = {
        enable_dynamic_test_discovery = true,
        env = {},
        extra_args = {},
        get_cwd = <function 34>,
        get_playwright_binary = <function 35>,
        get_playwright_config = <function 36>,
        persist_project_selection = true,
        preset = "none",
        projects = {},
        tempDataFile = "/home/ls-devs/.local/share/nvim/neotest-playwright-test-list.json"
      },
      results = <function 37>,
      root = <function 38>,
      <metatable> = {
        __call = <function 39>
      }
    }, {
      _build_spec = <function 40>,
      _discover_positions = <function 41>,
      _is_test_file = <function 42>,
      _remote_build_spec = <function 43>,
      build_spec = <function 44>,
      discover_positions = <function 45>,
      filter_dir = <function 46>,
      is_test_file = <function 47>,
      name = "neotest-vim-test",
      results = <function 48>,
      root = <function 49>,
      <metatable> = {
        __call = <function 50>
      }
    } },
  benchmark = {
    enabled = true
  },
  consumers = {},
  default_strategy = "integrated",
  diagnostic = {
    enabled = true,
    severity = 1
  },
  discovery = {
    concurrent = 16,
    enabled = true,
    filter_dir = <function 51>
  },
  floating = {
    border = "rounded",
    max_height = 0.6,
    max_width = 0.6,
    options = {}
  },
  highlights = {
    adapter_name = "NeotestAdapterName",
    border = "NeotestBorder",
    dir = "NeotestDir",
    expand_marker = "NeotestExpandMarker",
    failed = "NeotestFailed",
    file = "NeotestFile",
    focused = "NeotestFocused",
    indent = "NeotestIndent",
    marked = "NeotestMarked",
    namespace = "NeotestNamespace",
    passed = "NeotestPassed",
    running = "NeotestRunning",
    select_win = "NeotestWinSelect",
    skipped = "NeotestSkipped",
    target = "NeotestTarget",
    test = "NeotestTest",
    unknown = "NeotestUnknown",
    watching = "NeotestWatching"
  },
  icons = {
    child_indent = "│",
    child_prefix = "├",
    collapsed = "─",
    expanded = "╮",
    failed = "",
    final_child_indent = " ",
    final_child_prefix = "╰",
    non_collapsible = "─",
    passed = "",
    running = "",
    running_animated = { "/", "|", "\\", "-", "/", "|", "\\", "-" },
    skipped = "",
    unknown = "",
    watching = ""
  },
  jump = {
    enabled = true
  },
  library = {
    plugins = { "neotest" },
    types = true
  },
  log_level = 1,
  output = {
    enabled = true,
    open_on_run = true
  },
  output_panel = {
    enabled = true,
    open = "botright split | resize 15"
  },
  projects = {
    <metatable> = {
      __index = <function 52>
    }
  },
  quickfix = {
    enabled = true,
    open = false
  },
  run = {
    enabled = true
  },
  running = {
    concurrent = true
  },
  state = {
    enabled = true
  },
  status = {
    enabled = true,
    signs = true,
    virtual_text = false
  },
  strategies = {
    integrated = {
      height = 40,
      width = 120
    }
  },
  summary = {
    animated = true,
    enabled = true,
    expand_errors = true,
    follow = true,
    mappings = {
      attach = "a",
      clear_marked = "M",
      clear_target = "T",
      debug = "d",
      debug_marked = "D",
      expand = { "<CR>", "<2-LeftMouse>" },
      expand_all = "e",
      jumpto = "i",
      mark = "m",
      next_failed = "J",
      output = "o",
      prev_failed = "K",
      run = "r",
      run_marked = "R",
      short = "O",
      stop = "u",
      target = "t",
      watch = "w"
    },
    open = "botright vsplit | vertical resize 50"
  },
  watch = {
    enabled = true,
    symbol_queries = {
      elixir = <function 53>,
      go = "        ;query\n        ;Captures imported types\n        (qualified_type name: (type_identifier) @symbol)\n        ;Captures package-local and built-in types\n        (type_identifier)@symbol\n        ;Captures imported function calls and variables/constants\n        (selector_expression field: (field_identifier) @symbol)\n        ;Captures package-local functions calls\n        (call_expression function: (identifier) @symbol)\n      ",
      lua = '        ;query\n        ;Captures module names in require calls\n        (function_call\n          name: ((identifier) @function (#eq? @function "require"))\n          arguments: (arguments (string) @symbol))\n      ',
      python = "        ;query\n        ;Captures imports and modules they're imported from\n        (import_from_statement (_ (identifier) @symbol))\n        (import_statement (_ (identifier) @symbol))\n      ",
      ruby = '        ;query\n        ;rspec - class name\n        (call\n          method: (identifier) @_ (#match? @_ "^(describe|context)")\n          arguments: (argument_list (constant) @symbol )\n        )\n\n        ;rspec - namespaced class name\n        (call\n          method: (identifier)\n          arguments: (argument_list\n            (scope_resolution\n              name: (constant) @symbol))\n        )\n      '
    }
  }
}
INFO | 2024-02-01T13:20:40Z+0100 | ...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:33 | Starting child process
INFO | 2024-02-01T13:20:40Z+0100 | ...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:36 | Parent address: localhost:43845
INFO | 2024-02-01T13:20:40Z+0100 | ...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:42 | Starting child process with command: /usr/local/bin/nvim --embed --headless -n
INFO | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/config/init.lua:389 | Configuration complete
DEBUG | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/config/init.lua:390 | User config {
  adapters = { {
      build_position = <function 1>,
      build_spec = <function 2>,
      discover_positions = <function 3>,
      filter_dir = <function 4>,
      is_test_file = <function 5>,
      name = "neotest-jest",
      results = <function 6>,
      root = <function 7>,
      <metatable> = {
        __call = <function 8>
      }
    }, {
      build_spec = <function 9>,
      discover_positions = <function 10>,
      filter_dir = <function 11>,
      is_test_file = <function 12>,
      name = "neotest-vitest",
      results = <function 13>,
      root = <function 14>,
      <metatable> = {
        __call = <function 15>
      }
    }, {
      build_spec = <function 16>,
      discover_positions = <function 17>,
      filter_dir = <function 18>,
      is_test_file = <function 19>,
      name = "neotest-rust",
      results = <function 20>,
      root = <function 21>,
      <metatable> = {
        __call = <function 22>
      }
    }, {
      build_spec = <function 23>,
      discover_positions = <function 24>,
      filter_dir = <function 25>,
      is_test_file = <function 26>,
      name = "neotest-gtest",
      results = <function 27>,
      root = <function 28>,
      setup = <function 29>
    }, {
      build_spec = <function 30>,
      data = {},
      discover_positions = <function 31>,
      filter_dir = <function 32>,
      is_test_file = <function 33>,
      name = "neotest-playwright",
      options = {
        enable_dynamic_test_discovery = true,
        env = {},
        extra_args = {},
        get_cwd = <function 34>,
        get_playwright_binary = <function 35>,
        get_playwright_config = <function 36>,
        persist_project_selection = true,
        preset = "none",
        projects = {},
        tempDataFile = "/home/ls-devs/.local/share/nvim/neotest-playwright-test-list.json"
      },
      results = <function 37>,
      root = <function 38>,
      <metatable> = {
        __call = <function 39>
      }
    }, {
      _build_spec = <function 40>,
      _discover_positions = <function 41>,
      _is_test_file = <function 42>,
      _remote_build_spec = <function 43>,
      build_spec = <function 44>,
      discover_positions = <function 45>,
      filter_dir = <function 46>,
      is_test_file = <function 47>,
      name = "neotest-vim-test",
      results = <function 48>,
      root = <function 49>,
      <metatable> = {
        __call = <function 50>
      }
    } },
  benchmark = {
    enabled = true
  },
  consumers = {},
  default_strategy = "integrated",
  diagnostic = {
    enabled = true,
    severity = 1
  },
  discovery = {
    concurrent = 16,
    enabled = true,
    filter_dir = <function 51>
  },
  floating = {
    border = "rounded",
    max_height = 0.6,
    max_width = 0.6,
    options = {}
  },
  highlights = {
    adapter_name = "NeotestAdapterName",
    border = "NeotestBorder",
    dir = "NeotestDir",
    expand_marker = "NeotestExpandMarker",
    failed = "NeotestFailed",
    file = "NeotestFile",
    focused = "NeotestFocused",
    indent = "NeotestIndent",
    marked = "NeotestMarked",
    namespace = "NeotestNamespace",
    passed = "NeotestPassed",
    running = "NeotestRunning",
    select_win = "NeotestWinSelect",
    skipped = "NeotestSkipped",
    target = "NeotestTarget",
    test = "NeotestTest",
    unknown = "NeotestUnknown",
    watching = "NeotestWatching"
  },
  icons = {
    child_indent = "│",
    child_prefix = "├",
    collapsed = "─",
    expanded = "╮",
    failed = "",
    final_child_indent = " ",
    final_child_prefix = "╰",
    non_collapsible = "─",
    passed = "",
    running = "",
    running_animated = { "/", "|", "\\", "-", "/", "|", "\\", "-" },
    skipped = "",
    unknown = "",
    watching = ""
  },
  jump = {
    enabled = true
  },
  library = {
    plugins = { "neotest" },
    types = true
  },
  log_level = 1,
  output = {
    enabled = true,
    open_on_run = true
  },
  output_panel = {
    enabled = true,
    open = "botright split | resize 15"
  },
  projects = {
    <metatable> = {
      __index = <function 52>
    }
  },
  quickfix = {
    enabled = true,
    open = false
  },
  run = {
    enabled = true
  },
  running = {
    concurrent = true
  },
  state = {
    enabled = true
  },
  status = {
    enabled = true,
    signs = true,
    virtual_text = false
  },
  strategies = {
    integrated = {
      height = 40,
      width = 120
    }
  },
  summary = {
    animated = true,
    enabled = true,
    expand_errors = true,
    follow = true,
    mappings = {
      attach = "a",
      clear_marked = "M",
      clear_target = "T",
      debug = "d",
      debug_marked = "D",
      expand = { "<CR>", "<2-LeftMouse>" },
      expand_all = "e",
      jumpto = "i",
      mark = "m",
      next_failed = "J",
      output = "o",
      prev_failed = "K",
      run = "r",
      run_marked = "R",
      short = "O",
      stop = "u",
      target = "t",
      watch = "w"
    },
    open = "botright vsplit | vertical resize 50"
  },
  watch = {
    enabled = true,
    symbol_queries = {
      elixir = <function 53>,
      go = "        ;query\n        ;Captures imported types\n        (qualified_type name: (type_identifier) @symbol)\n        ;Captures package-local and built-in types\n        (type_identifier)@symbol\n        ;Captures imported function calls and variables/constants\n        (selector_expression field: (field_identifier) @symbol)\n        ;Captures package-local functions calls\n        (call_expression function: (identifier) @symbol)\n      ",
      lua = '        ;query\n        ;Captures module names in require calls\n        (function_call\n          name: ((identifier) @function (#eq? @function "require"))\n          arguments: (arguments (string) @symbol))\n      ',
      python = "        ;query\n        ;Captures imports and modules they're imported from\n        (import_from_statement (_ (identifier) @symbol))\n        (import_statement (_ (identifier) @symbol))\n      ",
      ruby = '        ;query\n        ;rspec - class name\n        (call\n          method: (identifier) @_ (#match? @_ "^(describe|context)")\n          arguments: (argument_list (constant) @symbol )\n        )\n\n        ;rspec - namespaced class name\n        (call\n          method: (identifier)\n          arguments: (argument_list\n            (scope_resolution\n              name: (constant) @symbol))\n        )\n      '
    }
  }
}
INFO | 2024-02-01T13:20:40Z+0100 | ...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:83 | CHILD | Connected to parent instance
INFO | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:380 | Initialising client
INFO | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:48 | Emitting starting event
DEBUG | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:50 | Calling listener summary for event starting
INFO | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/adapters/init.lua:18 | Found 2 adapters for directory /home/ls-devs/Projects/vite-project
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/adapters/init.lua:19 | Adapters: { {
    adapter = {
      build_position = <function 1>,
      build_spec = <function 2>,
      discover_positions = <function 3>,
      filter_dir = <function 4>,
      is_test_file = <function 5>,
      name = "neotest-jest",
      results = <function 6>,
      root = <function 7>,
      <metatable> = {
        __call = <function 8>
      }
    },
    root = "/home/ls-devs/Projects/vite-project"
  }, {
    adapter = {
      build_spec = <function 9>,
      discover_positions = <function 10>,
      filter_dir = <function 11>,
      is_test_file = <function 12>,
      name = "neotest-vitest",
      results = <function 13>,
      root = <function 14>,
      <metatable> = {
        __call = <function 15>
      }
    },
    root = "/home/ls-devs/Projects/vite-project"
  } }
INFO | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:281 | Searching /home/ls-devs/Projects/vite-project for test files
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: cypress
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: public
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: src
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: cypress/fixtures
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: cypress/e2e
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: cypress/support
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: src/assets
DEBUG | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:297 | Found { {
    id = "/home/ls-devs/Projects/vite-project",
    name = "vite-project",
    path = "/home/ls-devs/Projects/vite-project",
    type = "dir"
  } }
DEBUG | 2024-02-01T13:20:40Z+0100 | ...hare/nvim/lazy/neotest/lua/neotest/client/state/init.lua:54 | New positions at ID /home/ls-devs/Projects/vite-project
INFO | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:48 | Emitting discover_positions event
DEBUG | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:50 | Calling listener state for event discover_positions
DEBUG | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:50 | Calling listener summary for event discover_positions
INFO | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:327 | Discovering files with 16 workers
DEBUG | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:50 | Calling listener diagnostic for event discover_positions
DEBUG | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:50 | Calling listener status for event discover_positions
INFO | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:281 | Searching /home/ls-devs/Projects/vite-project for test files
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: cypress
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: public
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: src
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: cypress/fixtures
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: cypress/e2e
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: cypress/support
DEBUG | 2024-02-01T13:20:40Z+0100 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/find.lua:26 | Scanning directory: src/assets
DEBUG | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:297 | Found { {
    id = "/home/ls-devs/Projects/vite-project",
    name = "vite-project",
    path = "/home/ls-devs/Projects/vite-project",
    type = "dir"
  } }
DEBUG | 2024-02-01T13:20:40Z+0100 | ...hare/nvim/lazy/neotest/lua/neotest/client/state/init.lua:54 | New positions at ID /home/ls-devs/Projects/vite-project
INFO | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:48 | Emitting discover_positions event
DEBUG | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:50 | Calling listener state for event discover_positions
DEBUG | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:50 | Calling listener summary for event discover_positions
INFO | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:327 | Discovering files with 16 workers
DEBUG | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:50 | Calling listener diagnostic for event discover_positions
DEBUG | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:50 | Calling listener status for event discover_positions
INFO | 2024-02-01T13:20:40Z+0100 | ...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:496 | Initialisation finished in 0.021 seconds
INFO | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:48 | Emitting started event
DEBUG | 2024-02-01T13:20:40Z+0100 | ...are/nvim/lazy/neotest/lua/neotest/client/events/init.lua:50 | Calling listener summary for event started

Additional context I tried disabling adapters one by one but neotest-vim-test only found tests for cypress when all adapters are disabled.

rcarriga commented 5 months ago

neotest-vim-test doesn't match any root patterns and so if other adapters do match those patterns, it will not become active. neotest-jest and neotest-vitest are both matching hence why disabling one by one didn't work. You can configure adapters for a specific directory with :h neotest.setup_project() and only enable vim-test for your cypress project

ls-devs commented 5 months ago

Can confirm it's working with this solution. Thank's for the help. I would have appreciate if things can be done "automatically" but I'll take it.