Closed jfpedroza closed 10 months ago
I found a small bug that won't clear past test result records, above contains 4 times records.
Another small bug is that the output cannot be displayed when the test passes. The left side is the result of iex
test, the right side is the result of mix test
Also, does this strategy require the project to rely on {:ex_unit_notifier, "~> 1.2", only: :test}
?
Running the test on the summary tree(by key r
), it seems that the strategy used is still mix test
:
Finally, I would like to say that the speed really Awesome.
I found a small bug that won't clear past test result records, above contains 4 times records.
Got it, should be easy to fix.
Another small bug is that the output cannot be displayed when the test passes. The left side is the result of iex test, the right side is the result of mix test
This is not related to this PR. It's because there is no output for successful tests. Maybe it could be set to something like "Test passed in 50ms".
Also, does this strategy require the project to rely on {:ex_unit_notifier, "~> 1.2", only: :test}?
No, if you are seeing that error, it is because you have that formatter listed in extra_formatters
.
Running the test on the summary tree(by key r), it seems that the strategy used is still mix test:
The summary doesn't support specifying the strategy. You probably need to change the default strategy for the project in neotest.setup_project()
. If you do, you won't need to pass it anymore in neotest.run.run()
either.
@scottming Just fixed the two reported issues.
hi, Jhon, seems like the strategy field does not work in the setup.
require("neotest-elixir")({
args = { "--trace" },
strategy = "iex",
}),
but this lua require('neotest').run.run({strategy = 'iex'})
config will works
seems like the strategy field does not work in the setup.
Wrong place. It's a setting of the project in Neotest, not of the adapter.
require("neotest").setup_project(vim.loop.cwd(), {
adapters = {...},
default_strategy = "iex"
})
~still not work~
require("neotest").setup_project(vim.loop.cwd(), {
adapters = { require("neotest-elixir") },
default_strategy = "iex",
})
~seems like this line does not send the project strategy
to the client~
~https://github.com/nvim-neotest/neotest/blob/master/lua/neotest/client/runner.lua#L64~
~args = vim.tbl_extend("keep", args or {}, { strategy = config.default_strategy })
~
fixed here: https://github.com/nvim-neotest/neotest/commit/fbd806c92e4486f56926837541532c93ab8dcd0f
Another usage scenario we need to consider is that sometimes the loop of the iex
strategy will hang, so we need to provide a function to end the process.
Currently lua require('neotest').run.stop()
does not work
This problem can be reproduced when you type r
at the file cursor of the side tree.
Another bug is that if a test running in the sidebar encounters an error, the whole process crashes.
Adds a strategy for running tests in the same OS process every time.
The first time a test is run, the process starts. From there, other runs communicate with the same process.
Still WIP, but mostly complete.
Closes #12