-
Notifications
You must be signed in to change notification settings - Fork 6k
feat: add --help integration test #5434
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
Conversation
// NOTE@jsjoeio | ||
// We have this test to ensure that native modules | ||
// work as expected. If this is called on the wrong | ||
// platform, the test will fail. |
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.
🙅🏼♂️ I know we generally avoid comments like this and prefer putting this info in commits. But I feel like this should be front and center so that future developers don't accidentally delete this test.
I can be convinced otherwise though.
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.
Yeah this seems like a reasonable comment to me because our motivations for testing --help
are not self-apparent.
One way around that would be to change the wording of the test, maybe something like describe("native-modules")
and test("it should trigger native modules by running --help")
so the reasoning is baked into the code but IMO either way is good (I probably would have gone the comment route as well since you can be more descriptive without making a really long test name).
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.
I hadn't thought of going with the test name like that! Good point.
Cool! Glad we're in agreement. Happy to change later if we change our minds as well!
Codecov Report
@@ Coverage Diff @@
## main #5434 +/- ##
=======================================
Coverage 72.42% 72.42%
=======================================
Files 30 30
Lines 1672 1672
Branches 366 366
=======================================
Hits 1211 1211
Misses 398 398
Partials 63 63 Continue to review full report at Codecov.
|
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.
Nice! We can remove the list/install extensions tests since now right? (Or should we just leave them in anyway?)
Description
Previously, we added the
--install-extension
test to ensure that native modules worked as expected with the binary.However, that relies on a network connection (see microsoft/vscode#142812 (comment)). Instead, I propose this new integration test which checks the
--help
flagwhich fails if used on the wrong platform.
Fixes #5369