Skip to content

Commit

Permalink
feat: update doctor to reflect Java >= 17 (#2045)
Browse files Browse the repository at this point in the history
* feat: update doctor to reflect Java >= 17

* test: update tests
  • Loading branch information
szymonrybczak authored Aug 7, 2023
1 parent 0cbed3d commit 588753c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/cli-doctor/src/tools/healthchecks/__tests__/jdk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ describe('jdk', () => {
expect(diagnostics.needsToBeFixed).toBe(true);
});

it('returns false if JDK version is in range (JDK [11-18] version number format)', async () => {
it('returns false if JDK version is in range (JDK [17-20] version number format)', async () => {
// @ts-ignore
environmentInfo.Languages.Java = {
version: '14.0.4',
version: '17.0.8',
};

const diagnostics = await jdk.getDiagnostics(environmentInfo);
expect(diagnostics.needsToBeFixed).toBe(false);
});

it('returns true if JDK version is not in range (JDK < 11 version number format)', async () => {
it('returns true if JDK version is not in range (JDK < 17 version number format)', async () => {
// @ts-ignore
environmentInfo.Languages.Java = {
version: '1.8.0_282',
Expand All @@ -55,10 +55,10 @@ describe('jdk', () => {
expect(diagnostics.needsToBeFixed).toBe(true);
});

it('returns true if JDK version is not in range (JDK > 18 version number format)', async () => {
it('returns true if JDK version is not in range (JDK > 20 version number format)', async () => {
// @ts-ignore
environmentInfo.Languages.Java = {
version: '19.0.1',
version: '21.0.1',
};

const diagnostics = await jdk.getDiagnostics(environmentInfo);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-doctor/src/tools/versionRanges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
YARN: '>= 1.10.x',
NPM: '>= 4.x',
RUBY: '>= 2.6.10',
JAVA: '>= 11 < 19',
JAVA: '>= 17 <= 20',
// Android
ANDROID_SDK: '>= 33.x',
ANDROID_NDK: '>= 23.x',
Expand Down

0 comments on commit 588753c

Please sign in to comment.