From 88fdaa756810fc967a9eaf7c69352666a1c143a2 Mon Sep 17 00:00:00 2001 From: Alif Rachmawadi Date: Fri, 16 Aug 2019 15:34:20 +0700 Subject: [PATCH] added test for invalid version --- __tests__/installer.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index 9fc3d67..8477768 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -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); + }); });