test(doctor, jdk): fix windows jdk doctor install test #1549
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
the jdk doctor fix command is using "downloadAndUnzip", but the test
was mocking / spying on "unzip", this fixes the test to mock/spy on
the method actually used, patterned after the android studio test
This is the failure I see:
Test Plan:
It's literally made of test ;-) - I always start working in a repository by checking it out, and running all it's tests. I needed this PR in order to successfully run
yarn testagainst tip of master branch in my macos environment.Technically this also means there is a false-positive in CI, as
yarn tests:ci:unitis passing, I think that's becauseunzipis called (after the download) so the test assertion that the spy is called passes, and in the CI environment it downloads quickly enough not to hit the timeout I get locally, so it passes the test.