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

Device: Add unit tests and remove Q #462

Merged
merged 2 commits into from
Jul 3, 2018
Merged

Conversation

Menardi
Copy link
Contributor

@Menardi Menardi commented Jul 3, 2018

Platforms affected

Android

What does this PR do?

The main point of this PR is to increase test coverage of device.js. It's gone from 0% to 100% coverage. :)

Since I was going through device.js and figuring out how it works, I figured it was a good time to replace Q with native promises, as mentioned in CB-14158. I hope this is OK!

What testing has been done on this change?

  • Ran device-related commands
  • Ran unit tests

Checklist

  • Reported an issue in the JIRA database
  • Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
  • Added automated test coverage as appropriate for this change.

@codecov-io
Copy link

Codecov Report

Merging #462 into master will increase coverage by 2.21%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #462      +/-   ##
==========================================
+ Coverage   52.03%   54.25%   +2.21%     
==========================================
  Files          17       17              
  Lines        1695     1694       -1     
  Branches      312      312              
==========================================
+ Hits          882      919      +37     
+ Misses        813      775      -38
Impacted Files Coverage Δ
bin/templates/cordova/lib/device.js 100% <100%> (+77.55%) ⬆️

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 ca8931c...b2263fe. Read the comment docs.

@Menardi Menardi mentioned this pull request Jul 3, 2018
3 tasks
Copy link
Member

@dpogue dpogue left a comment

Choose a reason for hiding this comment

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

👍

@dpogue dpogue merged commit bd2ad99 into apache:master Jul 3, 2018
@Menardi Menardi deleted the device_tests branch July 3, 2018 05:02
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.

3 participants