-
Notifications
You must be signed in to change notification settings - Fork 646
Remove user supplied -run flags when running tests #2285
Remove user supplied -run flags when running tests #2285
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @scriptonist!
Looks like this is your first contribution to this project, Thanks & Welcome!
This project makes an attempt to separate out test related utility functions from others by having them in the testUtils.ts
file. So that would be my first feedback.
On second thought, I believe we can fix this bug by updating the existing getTestFlags
function instead of introducing a new function. What do you think of adding an optional parameter (default to false) to getTestFlags
that will control whether or not the run
parameter should be removed from the user provided flags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For below features, we dont want to use the user provided -run flag
- goBuild.ts: To run
go test
to file build errors in test file - goRunTestCodelens.ts: To create the codelens links above test functions
- goTest.ts Run test at cursor or run all tests in file
I believe in all other cases, we should respect the user provided -run flag.
Thoughts?
…rosoft#2285 (review)" This reverts commit 1aea035.
Hey @scriptonist We haven't heard back from you in a while, so I have taken the liberty to tweak your PR a bit and take it to conclusion. I have reverted the commits that were made due to my earlier suggestion to make I realized that this forces us to think from each entry point and instead there is a simpler way of doing this by removing the user provided Thanks for the work you put in here earlier Happy Coding! |
Towards: #2260
I've tried to address the bug in accordance with the issue comments. Given that I'm very new to the codebase and TS in general, there should be ample scope for improvement. I would really appreciate feedback and suggestions.