Skip to content
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

[cli] Add CLI login unit test #6866

Merged
merged 2 commits into from
Oct 19, 2021
Merged

[cli] Add CLI login unit test #6866

merged 2 commits into from
Oct 19, 2021

Conversation

TooTallNate
Copy link
Member

This has just been sitting in my working tree for a while, might as well push it up.

@@ -100,7 +100,7 @@ export default class Client extends EventEmitter {
let body;
if (isJSONObject(opts.body)) {
body = JSON.stringify(opts.body);
headers.set('content-type', 'application/json; charset=utf8');
headers.set('content-type', 'application/json; charset=utf-8');
Copy link
Member Author

Choose a reason for hiding this comment

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

Needed because express' body-parser is strict about this (which we use for the API test mocks - this is the first test that does a POST apparently).

Copy link
Member

Choose a reason for hiding this comment

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

shakes fist at express

old-man

@kodiakhq
Copy link
Contributor

kodiakhq bot commented Oct 19, 2021

This PR currently has a merge conflict. Please resolve this and then re-add the ['semver-major', 'semver-minor', 'semver-patch'] label.

@kodiakhq kodiakhq bot removed the semver: patch PR contains bug fixes label Oct 19, 2021
@styfle styfle added the semver: patch PR contains bug fixes label Oct 19, 2021
@codecov
Copy link

codecov bot commented Oct 19, 2021

Codecov Report

Merging #6866 (d49f450) into main (b88e65c) will increase coverage by 1.45%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6866      +/-   ##
==========================================
+ Coverage   49.26%   50.71%   +1.45%     
==========================================
  Files         126      126              
  Lines        4882     4886       +4     
  Branches     1166     1166              
==========================================
+ Hits         2405     2478      +73     
+ Misses       2466     2398      -68     
+ Partials       11       10       -1     
Impacted Files Coverage Δ
packages/cli/src/util/client.ts 76.74% <100.00%> (+3.48%) ⬆️
packages/cli/test/mocks/user.ts 100.00% <100.00%> (ø)
packages/cli/src/util/config/files.ts 37.68% <0.00%> (+7.24%) ⬆️
packages/cli/src/util/login/login.ts 50.00% <0.00%> (+30.00%) ⬆️
packages/cli/src/commands/login.ts 75.00% <0.00%> (+30.76%) ⬆️
packages/cli/src/util/output/cmd.ts 100.00% <0.00%> (+33.33%) ⬆️
packages/cli/src/util/output/highlight.ts 100.00% <0.00%> (+33.33%) ⬆️
packages/cli/src/util/output/erase-lines.ts 100.00% <0.00%> (+33.33%) ⬆️
packages/cli/src/util/pkg-name.ts 92.30% <0.00%> (+38.46%) ⬆️
... and 4 more

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 b88e65c...d49f450. Read the comment docs.

@kodiakhq kodiakhq bot merged commit c35c054 into main Oct 19, 2021
@kodiakhq kodiakhq bot deleted the update/login-test branch October 19, 2021 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants