-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
nio and busted? #366
Comments
Injecting
|
Dynamically resolve
|
Continuing the discussion from #349. I am currently writing an adapter for busted and I want to write tests for it in busted as well. I can run tests in general without issue following this blog post. The issue is when executing asynchronous functions like
neotest.lib.treesitter.parse_positions
.Here is a simple test file:
As you can see this busted test is able to call into Neovim's
vim
module. Other than that it is a regular busted test. Now let's adding an actial test.A naive attempt
This fails because
discover_positions
callslib.treesitter.parse_positions
without asynchronous context. The return values oflib.treesitter.parse_positions
are wrong and the file descriptor will be returned as the error. Issue #349 describes the same behaviour.Using
nio.tests.it
This throws another error about
it
beingnil
inside to body ofnio.tests.it
.Replicate
nio.tests.it
If the global
it
only exists within the test, how about we replicate the entire function inside the test?This raises a validation error inside
vim.startswith
.This error is raised by the failing assertion. If the test function does not raise any errors then the test works fine.
The text was updated successfully, but these errors were encountered: