GithubHelp home page GithubHelp logo

No tests found about neotest-go HOT 4 CLOSED

nvim-neotest avatar nvim-neotest commented on August 10, 2024 1
No tests found

from neotest-go.

Comments (4)

asfaltboy avatar asfaltboy commented on August 10, 2024

I, too, had experienced the annoying 'No tests found' 💢. And on top of that, it took me two days to just build the mental model of how the plugin, treesitter, etc work together to identify tests, and I was able to find the root cause for my issue.

In the end, for me, it was another adapter being used instead of go (neotest-zig), which meant it didn't find the test case name, but as you are showing above you're not registering the neotest-zig adapter.

What I really found useful is inspecting the debug logs that neotest emits. I will share what I did in case it helps you too:

  1. Change the neotest plugin opts to include the log level:
    "nvim-neotest/neotest",
    -- other key/vals ...
    opts = {
      level = vim.log.levels.DEBUG,
      adapters = {
        ["neotest-go"] = {
          -- Here we can set options for neotest-go, e.g.
          -- args = { "-tags=integration" }
          recursive_run = true,
        },
      },
    },
  2. Find out where neotest writes its plugins (source). I ran the command:
    :lua vim.print(pcall(vim.fn.stdpath, "log"))
    -- my output: /home/asfaltboy/.local/state/nvim/neotest.log
  3. restart neovim, and tail the log in another shell:
    tail -f /home/asfaltboy/.local/state/nvim/neotest.log
  4. In your neovim session, try and run neotest's run command.

If you can't identify the cause outright, please share the logs

from neotest-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.