1
0
Fork 0
mirror of https://github.com/subosito/flutter-action.git synced 2024-08-16 10:19:50 +02:00

added test for invalid version

This commit is contained in:
Alif Rachmawadi 2019-08-16 15:34:20 +07:00
parent 9b82c25a31
commit 88fdaa7568
No known key found for this signature in database
GPG key ID: 79DA63C0F3A55BB1

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);
});
});