Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlenaryBustedDirectory hangs when run from existing NeoVim instance #319

Open
smackesey opened this issue Feb 9, 2022 · 3 comments
Open

Comments

@smackesey
Copy link

I can run plenary tests from the command line. For instance, I have a project ifactor with one test file in test/ifactor_spec.lua. This works:

$ cd /path/to/ifactor/root
$ nvim --headless -c "PlenaryBustedDirectory test {minimal=true}"

However, when I try the same thing inside Neovim, I get a popup window that just says "Scheduling: /Users/smackesey/stm/code/lib/vim/ifactor/test/ifactor_spec.lua" and nothing else:

:cd /path/to/ifactor/root
:PlenaryBustedDirectory test {minimal=true}

So the test files are correctly discovered but then something goes awry in the execution.

@teto
Copy link
Contributor

teto commented May 3, 2022

I see something similar with neovim 0.7, I've tried enabling the tests in nixos but it hangs after displaying

========================================        
Testing:        /build/plenary.nvim-c2bb2d8/tests/plenary/async/util_spec.lua   
Success ||      async await util block_on should block_on       
Success ||      async await util block_on should work even when failing 
Success ||      async await util protect should be able to protect a non-leaf future    
Success ||      async await util protect should be able to protect a non-leaf future that doesnt fail   
        
Success:        4       
Failed :        0       
Errors :        0       
========================================      

@Conni2461
Copy link
Collaborator

maybe related @teto #353 (not related for the original issue)

@jghauser
Copy link

jghauser commented Mar 12, 2023

I'm seeing this error too now, trying to run the tests for my papis.nvim plugin.

Running nvim --headless -u tests/minimal_init.lua -c 'PlenaryBustedDirectory tests/spec' gives me:

Starting...Scheduling: tests/spec/cursor-actions/init_spec.lua
Scheduling: tests/spec/colors_spec.lua
Scheduling: tests/spec/commands_spec.lua
Scheduling: tests/spec/config_spec.lua
Scheduling: tests/spec/data_spec.lua
Scheduling: tests/spec/fs-watcher_spec.lua
Scheduling: tests/spec/health_spec.lua
Scheduling: tests/spec/init_spec.lua
Scheduling: tests/spec/keymaps_spec.lua
Scheduling: tests/spec/logger_spec.lua
Scheduling: tests/spec/papis-storage_spec.lua
Scheduling: tests/spec/sqlite-wrapper_spec.lua
Scheduling: tests/spec/utils_spec.lua

I recently switched from arch to nixos, and it used to work fine before. Running the tests individually works, but that's a bit tedious given the amount of tests. Can I do anything to troubleshoot the issue? @teto, have you ever managed to solve your issue (although it does look like it's somewhat different from mine)?

I'm using the nvim plugins from nixpkgs unstable, so I should have the latest version of plenary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants