Menardi opened a new pull request #458: Unit tests for AndroidProject and Builders URL: https://github.com/apache/cordova-android/pull/458 <!-- 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 unit tests ### What does this PR do? I have written some more unit tests to continue increasing the coverage. This brings coverage to 54.94%. The coverage didn't increase as much as expected, as one of the files I have now written tests for (`GenericBuilder.js`) was not included at all in the previous coverage reports. Unlike my previous tests, none of the files I have covered this time have reached 100%. This is because they are processing configuration files which I do not have good example of for testing. The main file I need a good example of is `project.properties`, with various entries. If there is one I could use, I am happy to complete the test coverage for these files. Another thing to note is that `GradleBuilder.js` and `StudioBuilder.js` are very similar files, so the tests are pretty much copy-pasted. `GenericBuilder.js` appears to exist to pull out some functionality shared between the two, but it could definitely contain more. In a future PR, once I have complete test coverage of these files, I would like to break out the common code to make it more maintainable. ### What testing has been done on this change? Locally run `npm run unit-tests` ### 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
