Skip to content

Profile update test - #53

Open
harshil15999 wants to merge 2 commits into
LockedUp-Coders:masterfrom
harshil15999:profile-update-test
Open

Profile update test#53
harshil15999 wants to merge 2 commits into
LockedUp-Coders:masterfrom
harshil15999:profile-update-test

Conversation

@harshil15999

Copy link
Copy Markdown

Please see the code and revert back .

Few doubts

  1. havent been able to understand what response should be expected when a POST request is made
  2. Also wanted to confirm whether the POST request has to be made at localhost:3000/user/profile

Resolves #42

I have written the test for user profile please check it and tell me my mistakes.
I did not know how to run it as I havent understood how the person in the codebase is sending which response on updating user profile
@lockedup-bot

lockedup-bot Bot commented Jun 18, 2020

Copy link
Copy Markdown

Thanks @harshil15999, for opening the pull request! 🙌
One of our team-mates will review the pull request soon. ✅

@codecov

codecov Bot commented Jun 18, 2020

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.67%. Comparing base (50ce3bf) to head (a7179a0).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #53   +/-   ##
=======================================
  Coverage   67.67%   67.67%           
=======================================
  Files           7        7           
  Lines          99       99           
  Branches        5        5           
=======================================
  Hits           67       67           
  Misses         31       31           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread test/user-profile-test.ts
password:'123',
teams:['2','3']
}
chai.request('http://localhost:3000')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not the correct way. check sample code repo

Comment thread test/user-profile-test.ts
.send(update)
.end((err,res)=>{
res.should.have.status(200);
res.body.should.be.json;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

check responses individually, like expect the response to contain new data

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.

New test proposal :Test User Profile Updation

2 participants