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

test: consider using custom external nvim process #10

Open
tmillr opened this issue May 2, 2023 · 0 comments
Open

test: consider using custom external nvim process #10

tmillr opened this issue May 2, 2023 · 0 comments

Comments

@tmillr
Copy link
Owner

tmillr commented May 2, 2023

There are a couple of (potential) issues when using Plenary alone:

1. Tests are not isolated

  • Every test in a spec file runs within the same nvim process/instance requiring manual sanitization between tests

2. Plenary runs tests in headless mode

  • This is probably not an issue 90%+ the time, but it seems that Neovim's behavior does differ slightly when headless (particularly when it comes to the issuing of messages/prompts/etc.)

Suggestion: spawn an nvim process/job in each test and run the test in that. Either run the entire it() function within that process, or simply communicate with it over rpc (i.e. call fns and get/set values over rpc as needed, but assertions are still executed in the initial Plenary process).

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

No branches or pull requests

1 participant