You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/05/31 04:31:49 UTC

[GitHub] Menardi opened a new pull request #445: (android) Add unit tests for run and retryPromise

Menardi opened a new pull request #445: (android) Add unit tests for run and retryPromise
URL: https://github.com/apache/cordova-android/pull/445
 
 
   <!--
   Please make sure the checklist boxes are all checked before submitting the PR. The checklist
   is intended as a quick reference, for complete details please see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   Android
   
   ### What does this PR do?
   I noticed the test coverage for `cordova-android` was rather low, so I decided to start writing some tests. To figure out the test system, I first covered `retry.js`, which is a simple module that retries a promise-based function a given number of times. I also fixed a typo in this file which was mildly annoying.
   
   The main tests I have written are in `run.js`, which now has 100% test coverage (up from 27%). This module handles the selection of the device or emulator to run on.
   
   I would like to continue to add unit tests to help improve the code coverage, but am submitting this PR first to check that I am on the right track. I have used ES2015 notation for the tests to keep it more readable - I don't anticipate this to be a problem since it is supported in all recent node versions.  
   
   ### What testing has been done on this change?
   I have run the tests using `npm run unit-tests`, and checked the coverage with `npm run cover`.
   
   ### Checklist
   - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 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.
   - [x] Added automated test coverage as appropriate for this change.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org