Golang: Run sub tests individually when using custom test setup func as callback to t.Run #26745
geoffreyphillips
started this conversation in
Language Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
in Vscode I am able to run\debug individual sub tests indicated by calls to

t.Run
In Zed I don't always have that option and must run the parent test func

If I'm reading this block of code correctly I think the custom setup func would be the culprit. I think it says it expects a func that accepts *testing.T. VSCode meanwhile doesn't seem to do any kind of verification of the callback. I've used functions that accept a callback that accepts a param and also a callback that doesn't accept a param. Everything works in vscode
The part up for discussion would be what kind of verification should zed do for the callback? Nothing? Allow for either a func that takes *testing.T or a func that returns a func that takes *testing.T?
Beta Was this translation helpful? Give feedback.
All reactions