Skip to content

feat(testing): add test for parse when error in args + config #4866

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 3 commits into from
Feb 15, 2022

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Feb 14, 2022

This adds a test for parse to hit a line where an error is thrown with a bad arg and a config file path are passed in.

Fixes #4858

@jsjoeio jsjoeio requested a review from a team February 14, 2022 22:39
@jsjoeio jsjoeio self-assigned this Feb 14, 2022
@jsjoeio jsjoeio temporarily deployed to CI February 14, 2022 22:39 Inactive
@@ -218,8 +218,8 @@ describe("update", () => {
it("should reject if response has status code 500", async () => {
if (isAddressInfo(_address)) {
const mockURL = `http://${_address.address}:${_address.port}/reject-status-code`
let provider = new UpdateProvider(mockURL, settings())
let update = await provider.getUpdate(true)
const provider = new UpdateProvider(mockURL, settings())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very strange...I didn't make this change but when I ran yarn lint or yarn fmt locally, this changed happened?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh I think we are passing --fix to auto-fix but I did not know they would change let to const.

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 didn't either! Maybe a new thing? Or maybe I did something janky...no idea

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be something new! Either way, const looks right since we are not changing these values.

@codecov
Copy link

codecov bot commented Feb 14, 2022

Codecov Report

Merging #4866 (4418e56) into main (e3e9f05) will increase coverage by 0.06%.
The diff coverage is n/a.

❗ Current head 4418e56 differs from pull request most recent head f9961f9. Consider uploading reports for the commit f9961f9 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4866      +/-   ##
==========================================
+ Coverage   69.73%   69.79%   +0.06%     
==========================================
  Files          29       29              
  Lines        1649     1649              
  Branches      363      363              
==========================================
+ Hits         1150     1151       +1     
+ Misses        425      424       -1     
  Partials       74       74              
Impacted Files Coverage Δ
src/node/cli.ts 83.96% <0.00%> (+0.38%) ⬆️

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 e3e9f05...f9961f9. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Feb 14, 2022

✨ Coder.com for PR #4866 deployed! It will be updated on every commit.

@jsjoeio jsjoeio temporarily deployed to CI February 15, 2022 21:52 Inactive
@jsjoeio jsjoeio merged commit 94f378c into main Feb 15, 2022
@jsjoeio jsjoeio deleted the jsjoeio-test-node branch February 15, 2022 23:19
TinLe pushed a commit to TinLe/code-server that referenced this pull request Apr 23, 2022
…r#4866)

* chore: fmt cleanup

* feat(parse): add test error w/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Testing]: add more coverage for src/node/cli.ts
2 participants