nvim-neotest / neotest-go

MIT License
133 stars 43 forks source link

No Tests Found #64

Closed obaranek closed 10 months ago

obaranek commented 10 months ago

I get "No tests Found" Error when I try to run the tests. It is able to recognize the test file, but none of the test functions..

This is an example test file that I'm to trying to run tests on

package main
import "testing"
func TestNewDeck(t *testing.T) {
    d := newDeck()
    if len(d) != 16 {
        t.Errorf("Expected deck length of 16 but got %v", len(d))
    }
    if d[0] != "Ace of Spades" {
        t.Errorf("Expected first card of Ace of Spades but got %v", d[0])
    }
    if d[len(d) - 1] != "Four of Clubs" {
        t.Errorf("Expected last card of Four of Clubs but got %v", d[len(d) - 1])
    }
}

And this is my neotest-go config

require("neotest").setup({
    adapters = {
        require("neotest-go")({
              experimental = {
                  test_table = true,
              },
              args = { "-timeout=20s" },
            }),
        }
})
pavelshtanko commented 10 months ago

Foe me the problem what that I've set up lazy=true for plugin in Lazy.nvim

sergii4 commented 10 months ago

Duplicate #51