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

refactor(env/java): improve tests and implementation #1246

Merged
merged 5 commits into from Jun 23, 2021

Conversation

raphinesse
Copy link
Contributor

Motivation and Context

This PR basically fixes up the changes from #1220. I was too busy to point out the problems before it was merged.

Description

  • improve and extend tests
  • minor code improvements

Testing

The automated test suite passes

@raphinesse raphinesse added this to the 9.1.1 milestone Jun 23, 2021
@raphinesse raphinesse requested a review from breautek June 23, 2021 15:36
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2021

Codecov Report

Merging #1246 (5effa2d) into master (6d803e2) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1246      +/-   ##
==========================================
- Coverage   72.00%   71.90%   -0.11%     
==========================================
  Files          21       21              
  Lines        1697     1694       -3     
==========================================
- Hits         1222     1218       -4     
- Misses        475      476       +1     
Impacted Files Coverage Δ
bin/templates/cordova/lib/env/java.js 98.00% <100.00%> (-2.00%) ⬇️

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 6d803e2...5effa2d. Read the comment docs.

@raphinesse raphinesse changed the title refactor(env/java): use regex to get java version from javac output 1220 refactor(env/java): improve tests and implementation Jun 23, 2021
@raphinesse raphinesse merged commit 0f13f4a into apache:master Jun 23, 2021
@raphinesse raphinesse deleted the fixup-1220 branch June 23, 2021 16:22
sakibguy added a commit to sakibguy/cordova-android that referenced this pull request Jun 24, 2021
refactor(env/java): improve tests and implementation (apache#1246)
wedgberto pushed a commit to wedgberto/cordova-android that referenced this pull request May 17, 2022
This basically fixes up the changes from apache#1220.

* test(env/java): replace test that duplicates implementation
* test(env/java): stub _ensure to focus on unit under test
* test(env/java): add test for invalid output
* refactor(env/java): keep try block small
* refactor(env/java): shorten excessive comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants