You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the cursor is placed between t.Run("subtest 1") and t.Run("subtest 2"), I would expect Neotest to run the entire TestFoo. However, it currently runs "subtest 1".
Additionally, the summary buffer highlights "subtest 1", but I would expect it to highlight TestFoo, since the cursor isn't inside "subtest 1" anymore.
Expected Behavior
Neotest should run the test that fully contains the cursor, rather than defaulting to the first test before it.
Proposal
Would it be possible to add an option to run the most specific (innermost) test scope that the cursor is currently inside?
As I see it, it can be done either with additional option for neotest configuration or option for specified functions: run.run() and summary.open().
P.S. I'm willing to contribute a fix for this, but I’d need some guidance.
The text was updated successfully, but these errors were encountered:
Description
Currently, when running the nearest test using:
Neotest executes the first test before the current line. However, in some cases, tests can be nested. For example, in Go:
If the cursor is placed between
t.Run("subtest 1")
andt.Run("subtest 2")
, I would expect Neotest to run the entireTestFoo
. However, it currently runs"subtest 1"
.Additionally, the summary buffer highlights
"subtest 1"
, but I would expect it to highlightTestFoo
, since the cursor isn't inside"subtest 1"
anymore.Expected Behavior
Neotest should run the test that fully contains the cursor, rather than defaulting to the first test before it.
Proposal
Would it be possible to add an option to run the most specific (innermost) test scope that the cursor is currently inside?
As I see it, it can be done either with additional option for neotest configuration or option for specified functions:
run.run()
andsummary.open()
.P.S. I'm willing to contribute a fix for this, but I’d need some guidance.
The text was updated successfully, but these errors were encountered: