Closed h0adp0re closed 1 year ago
Hi @h0adp0re, thanks for sharing the issue. I'm trying to reproduce it but In my projects all works fine. Are you receving it in a public repo? Can you write your configs? Plugin manager? OS?
Sadly no, it's a private repo. I can try in a test project, haven't had time to do that yet.
My scenario is such that we have jest
on master
and vitest
on next
– where we are migrating our product to Vue 3.
neotest-jest
works on master
, but neotest-vitest
is not working on next
.
I'm on macOS. I'm using Plug, I should probably test the plugin on a bare config. Although, I have forgotten how to do that.
I will first try to test it on a fresh project. When this produces no results, I'll try with a minimal config.
Ideally neotest-vitest
should work in each condition, so We should understand what's wrong with your private repo. Please keep me informed of your attempts
I don't know what happened or what was wrong, it started working. I just got done migrating from init.vim
+ Plug
to init.lua
+ packer
, maybe that had an impact?
Happy to know you solved your problem. Before closing the issue I'm going to investigate more on init.vim + Plug. Have other lua plugins worked on your previous config?
Yes, every plugin worked normally on Plug. If you want to test with roughly what I had:
" init.vim
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source $HOME/.vim/vimrc
" contains the following:
" so $HOME/.vim/viml/plugins.vim - contains all vim-plug stuff
lua require('plugins') " lua/plugins/init.lua
" contains the following:
" require("plugins.neotest") - neotest config
One "issue" remains, though – when i have both neotest-vitest
and neotest-jest
active in the adapters
table, neotest-vitest
appears for a quick moment before neotest-jest
takes over. But I suppose this anomaly is documented in this project.
Ok, so the issue has reappeared now. Can't use neotest-vitest
because of this error:
Error executing luv callback:
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: .../packer/start/neotest-vitest/lua/neotest-vitest/init
.lua:329: attempt to index field 'location' (a nil value)
stack traceback:
[C]: in function 'error'
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:18: in function 'callback_or_next'
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:45: in function <...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:44>
Not sure in what conditions the problem appears, will try to investigate.
Note that I am now using packer and everything is configured as per the instructions.
Edit: and neotest-vitest
is the only adapter.
Hi @h0adp0re! sorry for the late reply. Not sure if It is the exact error you posted before. When does it occur? What's the Vitest version?
Hey, sorry for the delay. I can't reproduce the problem once again. You can close the issue or keep it open if you want to investigate some more. I will update if and when I encounter the problem again.
Ok. In the meantime I have investigated and encountered this error in old versions of Vitest (0.18) due to the missing position field in the json test report. I have updated this adapter to handle this particular case. Please open a new problem if it occurs again
Hey alright, that's good news. Our project uses Vitest 0.16.0
so maybe I'll look into updating that as well. Thanks for investigating!
Hello, I am getting this error when opening neotest summary window.
When attempting to run a single test, i get a message "No tests found".
nvim
neotest
neotest-vitest
neotest-jest
is also installed but currently disabledvitest
is present inpackage.json
and installed