Closed nexxai closed 9 months ago
Hmm, I think you have a point regarding sail detection - at the moment it is just looking for vendor/bin/sail, when it seems like the adapter should probably try to be smarter about it. What I'd love to do is detect that sail is running, but that goes a tad outside my comprehension of lua
just yet.
I think I'll start by updating it to look for docker-compose.yml
as well, since that's not created by default.
I'm not 100% sure why at the moment, but it looks like setting non-callable values in the config isn't working. Instead though, you can set it as sail_enabled = function() return false end
and it should work.
Also, bit of a side note/tip: Your keybind can be simplified to
vim.keymap.set('n', '<leader>tn', function() require('neotest').run.run() end)
So it runs code lua directly rather than calling the lua
command to do it.
Instead though, you can set it as sail_enabled = function() return false end and it should work.
This seems to have solved my issue, so thanks!
Just curious if you're aware of any reason why a passing test still shows in the gutter as failed:
This is definitely NOT a failure of your plugin it happened in the theutz's version too, but maybe you've see a similar issue in the past and know how to fix it? Doesn't really affect me, but would like to solve it if I can.
Hmm, that's interesting. I can't seem to replicate that in a local test with the same signature.
Does your neotest.log (usually at ~/.local/state/nvim/neotest.log) say anything when you try?
If not, try setting log_level = vim.log.levels.DEBUG,
in neotest's config and see if anything seems relevant :sweat_smile:
lmao - it's been doing that since I started teaching myself neovim 2-3 months ago. I just went to try it after your suggestion and now it works perfectly. Computers are fun.
Who knows what happened! Either way, glad it's working for ya! ¯\_(ツ)_/¯
Hey, so I just switched over from theutz's original version to this fork but now when I try to run my tests (using this keymap:
vim.keymap.set("n", "<leader>t", "<cmd>lua require('neotest').run.run()<cr>")
), I get this error:I don't think I did anything different, I just updated the name of the form in my
test.lua
file:test.lua
Anyone have any ideas as to what the problem might be? If I switch back to
theutz
's version, everything works.One thing I noticed is that the plugin checks for the existence of
vendor/bin/sail
and if it's there, assumes Sail should be enabled. AFAIK, Sail is included with every Laravel app, whether you use it or not (it's in myvendor/bin
folder but I do not use it) and so that check may need to be more robust? Not sure if that has anything to do with this, just saw the note in the README that says:Which kind of feels like it's applicable here. I tried manually setting
sail_enabled = false
in therequire("neotest-pest")
config options, but that didn't seem to have an effect.