vim-test / vim-test

Run your tests at the speed of thought
3.01k stars 394 forks source link

Setting `test#strategy` has no effect #826

Open schnittchen opened 2 weeks ago

schnittchen commented 2 weeks ago

I've tried

:let g:test#strategy = "neovim_vscode"
:let g:test#strategy = "foo"
:let test#strategy = "neovim_vscode"
:let test#strategy = "foo"

and nothing ever changes. I've read out the value using let [g:]test#strategy after test running to make sure it's not overwritten.

schnittchen commented 2 weeks ago

And suddenly there's an effect.

I'll investigate further

Edit: Indeed, the effect is not immediate unless the variable is not set initially. Maybe it's being cached

dkaszews commented 5 days ago

What command are you using to execute your commands? I have found that some, especially TestLatest, reuse the last settings.

Looking at source: https://github.com/vim-test/vim-test/blob/8872ec0f788af934386b2aef0cd28a5c2b923146/autoload/test.vim#L70-L77 there are some flows where the setting is not read. You can try print-debugging that file by adding some echom strategy and sourcing it or restarting vim to update plugin source code.