codeuino / social-platform-donut-backend

Donut API:
http://donut-api-prod.codeuino.org/
GNU General Public License v3.0
24 stars 57 forks source link

added test cases for url shortener and modified some code #121

Closed Rupeshiya closed 4 years ago

Rupeshiya commented 4 years ago

name: URL shortener Test case about: Written-test cases for a URL shortener title: ''added test cases for URL shortener and modified some code labels: ''Feature assignees: ''Rupeshiya


Problem

Github Issue Number: #120 As of now, there wasn't any test cases for URL shortener_

Solution of problem

So added test cases for that using jest and supertest

Type of Change

[ ] Bug fix [✓] New Feature [ ] Development of UI/UX prototypes [✓] Small refactor [ ] Change in Documentation

Checklist

[✓] My code follows the same style as the codebase [ ] My Code change requires a change in documentation [ ] I have updated the Readme accordingly [✓] I made PR against development branch [✓] I have run the test cases locally and it's passing. [✓] I have squashed my commits

Rupeshiya commented 4 years ago

@devesh-verma @vaibhavdaren Please review. Also please merge the previous PR where I fixed those Test cases for comments and Post APi then this PR will pass all the test cases.

Rupeshiya commented 4 years ago

@devesh-verma I don't have access to backend repo so I am unable to add labels and assignees.

codecov[bot] commented 4 years ago

Codecov Report

Merging #121 into development will increase coverage by 5.96%. The diff coverage is 66.86%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #121      +/-   ##
===============================================
+ Coverage        64.21%   70.17%   +5.96%     
===============================================
  Files               20       26       +6     
  Lines              394      674     +280     
  Branches            53       93      +40     
===============================================
+ Hits               253      473     +220     
- Misses             122      180      +58     
- Partials            19       21       +2     
Impacted Files Coverage Δ
app/models/Comment.js 85.71% <ø> (ø)
app/models/Organisation.js 55.55% <ø> (ø)
app/models/Post.js 66.66% <ø> (ø)
app/models/UrlShortner.js 100.00% <ø> (ø)
app/routes/urlShortner.js 100.00% <ø> (ø)
app/controllers/organization.js 53.22% <23.80%> (-4.67%) :arrow_down:
app/controllers/user.js 57.14% <40.90%> (+2.21%) :arrow_up:
app/controllers/auth.js 85.71% <50.00%> (+1.09%) :arrow_up:
app/models/Event.js 61.90% <50.00%> (ø)
app/controllers/urlShortner.js 57.69% <55.55%> (+46.15%) :arrow_up:
... and 17 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 92b6a55...a2d4ade. Read the comment docs.