Skip to content

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

Merged
merged 2 commits into from
Aug 10, 2022
Merged

feat: add --help integration test #5434

merged 2 commits into from
Aug 10, 2022

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Aug 9, 2022

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 flag
which fails if used on the wrong platform.

Fixes #5369

@jsjoeio jsjoeio requested a review from a team August 9, 2022 20:35
@jsjoeio jsjoeio self-assigned this Aug 9, 2022
@jsjoeio jsjoeio added testing Anything related to testing rebase when passing labels Aug 9, 2022
Comment on lines +3 to +6
// 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.
Copy link
Contributor Author

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.

Copy link
Member

@code-asher code-asher Aug 10, 2022

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).

Copy link
Contributor Author

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!

@jsjoeio jsjoeio temporarily deployed to npm August 9, 2022 20:39 Inactive
@github-actions
Copy link

github-actions bot commented Aug 9, 2022

✨ code-server dev build published to npm for PR #5434!

  • Last publish status: success
  • Commit: b059cc4

To install in a local project, run:

npm install @coder/code-server-pr@5434

To install globally, run:

npm install -g @coder/code-server-pr@5434

@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #5434 (b059cc4) into main (11b2ef9) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11b2ef9...b059cc4. Read the comment docs.

@repo-ranger repo-ranger bot temporarily deployed to npm August 9, 2022 20:47 Inactive
Copy link
Member

@code-asher code-asher left a 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?)

@repo-ranger repo-ranger bot merged commit 6d8f30d into main Aug 10, 2022
@repo-ranger repo-ranger bot deleted the jsjoeio/5369 branch August 10, 2022 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Anything related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Chore]: Investigate integration test flakes
2 participants