From b3288c7098799c46d55f1087d5acd0b5dfd28464 Mon Sep 17 00:00:00 2001 From: Gil Tene Date: Sat, 2 Nov 2019 20:56:27 -0700 Subject: [PATCH] Update installer.test.ts --- __tests__/installer.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index 8a60a53b..6f320b68 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -109,6 +109,16 @@ describe('installer tests', () => { expect(fs.existsSync(path.join(JavaDir, 'bin'))).toBe(true); }, 100000); + it('Throws if invalid java packge specified', async () => { + let thrown = false; + try { + await installer.getJava('8.0.222', 'x64', '', 'badjdk'); + } catch { + thrown = true; + } + expect(thrown).toBe(true); + }); + it('Throws if invalid directory to jdk', async () => { let thrown = false; try {