Update installer.test.ts

This commit is contained in:
Gil Tene 2019-11-02 20:56:27 -07:00 committed by GitHub
parent 3cead9f6ad
commit b3288c7098
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {