From 48fc7b1818ad521426675c2d007c1f9303df4e18 Mon Sep 17 00:00:00 2001 From: Gil Tene Date: Sat, 2 Nov 2019 21:30:28 -0700 Subject: [PATCH] Touchup test --- __tests__/installer.test.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index 7bd105aa..ff2d61b5 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -108,7 +108,17 @@ describe('installer tests', () => { expect(fs.existsSync(`${JavaDir}.complete`)).toBe(true); expect(fs.existsSync(path.join(JavaDir, 'bin'))).toBe(true); }, 100000); - + + it('Throws if invalid java package is specified', async () => { + let thrown = false; + try { + await installer.getJava('8.0.222', 'x64', '', 'bad jdk'); + } catch { + thrown = true; + } + expect(thrown).toBe(true); + }); + it('Throws if invalid directory to jdk', async () => { let thrown = false; try {