added test for invalid version

This commit is contained in:
Alif Rachmawadi
2019-08-16 15:34:20 +07:00
parent 9b82c25a31
commit 88fdaa7568

View File

@@ -45,4 +45,14 @@ describe('installer tests', () => {
expect(fs.existsSync(`${sdkDir}.complete`)).toBe(true);
expect(fs.existsSync(path.join(sdkDir, 'bin'))).toBe(true);
}, 100000);
it('Throws if no location contains correct flutter version', async () => {
let thrown = false;
try {
await installer.getFlutter('1000.0', 'dev');
} catch {
thrown = true;
}
expect(thrown).toBe(true);
});
});