klen / nvim-test

A Neovim wrapper for running tests
MIT License
183 stars 26 forks source link

go - arguments completely ignored? #32

Closed a-h closed 1 year ago

a-h commented 1 year ago

I've created some custom configuration to create a coverage file.

local nvimtest = require('nvim-test')
require('nvim-test.runners.go-test'):setup {
  args = { "test", "-v", "-cover", "-coverprofile", "coverage.out" },
}
nvimtest.setup()

And I can see that the configuration works:

image

But no coverage.out file gets created.

When I run it myself, it works fine.

go test -cover -coverprofile=coverage.out ./...

If I change the args to be nonsensical...

image

And run the test, well... it still works!

image

It looks like the args are completely ignored.

I have no idea how to view the command that was actually executed.

a-h commented 1 year ago

Sorry, my mistake. I had vim-test and nvim-test installed at the same time. Removing vim-test made it work perfectly.