go.nvim icon indicating copy to clipboard operation
go.nvim copied to clipboard

GoAddTest and GoAddtAllTest returns `""` for all functios and dose not creat `_test.go` file

Open gozes opened this issue 7 months ago • 7 comments

For maybe a week or more, both GoAddTest and GoAddtAllTest will always return "" when trying to generate a test.

all other unit test related commands work, even running table subtest work but only generateincg the test is not working at all

gozes avatar Jul 09 '25 15:07 gozes

same here

kyoryo avatar Jul 14 '25 18:07 kyoryo

Do you have any console logs when the command is run?

ray-x avatar Jul 16 '25 22:07 ray-x

Nop, no errors or anything, I would have added them when I opened the issue. Just an empty string as part of the message letting you know that a test was created but no test or test file is created.

It would usually say something like created test <name of test> instead all I get is created test for ""

gozes avatar Jul 16 '25 23:07 gozes

If the issue were easy to reproduce, a log wouldn’t be necessary. Since I can’t reproduce it on my end, a log would be really helpful. By the way, as it only occurred recently, have you updated Neovim or Treesitter recently?

ray-x avatar Jul 16 '25 23:07 ray-x

Yup what I mean is that if I had found any logs I would have shared as I always do when I open issue there's just non to be found.

I'm on neovim 0.11 and I tend to update all my plugins about once a week so I should be as up to date as possible minus a few days/comitis

gozes avatar Jul 17 '25 06:07 gozes

you can have additional logs by setup

{
    verbose = true, -- enable for debug
    log_path = vim.fn.expand('$HOME') .. '/tmp/gonvim.log',   -- this put lots at ~/tmp/gonvim.log
}

Please capture the logs while running GoAddTest and share the output. Feel free to remove any information you consider private before sending.

ray-x avatar Jul 18 '25 12:07 ray-x

I've batch updated my plugins and this is worked again. IDK which one. But thanks for the log config, i will make sure to log it if its ever happened again.

kyoryo avatar Jul 18 '25 20:07 kyoryo