Skip to content

[BUG] No Test Found #495

Open
Open
@schester44

Description

@schester44

NeoVim Version
0.11

Describe the bug
I get a "No Test Found" message when attempting to run a test. I have the playwright, mocha, and vitest adapters installed. I'm trying to run a playwright test and I get the following error message. I get this error for any/all of the adapters so I suspect its not a specific adapter.

stack traceback:
[C]: in function 'assert'
...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:147: in function 'call'
...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:189: in function 'discover_positions'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:300: in function <...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:264>
[C]: in function 'xpcall'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:264: in function '_update_positions'
...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:317: in function <...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:315>
ERROR | 2025-03-07T12:08:53Z-0500 | ...ocal/share/nvim/lazy/neotest/lua/neotest/client/init.lua:309 | Couldn't find positions in path /Users/schester/work/risk-management/web-client/src/lib/card-expiry.test.ts ...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:147: Invalid subprocess call: Vim:Error invoking 'nvim_exec_lua' on channel 3:

      consumers = {
        playwright = require('neotest-playwright.consumers').consumers,
      },
      adapters = {
        mochaAdapter,
        require 'neotest-vitest' {
          vitestCommand = 'yarn test',
          cwd = '/Users/schester/work/risk-management/web-client',
        },
        require('neotest-playwright').adapter {
          options = {
            env = { NODE_ENV = 'test' },
            persist_project_selection = true,
            enable_dynamic_test_discovery = true,
            ---@diagnostic disable-next-line: unused-local
            filter_dir = function(name, rel_path)
              return string.match(rel_path, 'playwright')
            end,
          },
        },
      },

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions