diff --git a/lib/utils/downloadTemplateFromRepo.test.js b/lib/utils/downloadTemplateFromRepo.test.js index d005185ad..ac2259707 100644 --- a/lib/utils/downloadTemplateFromRepo.test.js +++ b/lib/utils/downloadTemplateFromRepo.test.js @@ -125,15 +125,14 @@ describe('downloadTemplateFromRepo', () => { }); describe('parseRepoURL', () => { - it('should throw an error if no URL is provided', () => { expect(parseRepoURL).to.throw(Error); }); it('should throw an error if URL is not valid', () => { try { - parseRepoURL('non_valid_url') - } catch(e) { + parseRepoURL('non_valid_url'); + } catch (e) { expect(e).to.be.an.instanceOf(Error); } }); @@ -141,7 +140,7 @@ describe('downloadTemplateFromRepo', () => { it('should throw an error if URL is not of valid provider', () => { try { parseRepoURL('https://kostasbariotis.com/repo/owner'); - } catch(e) { + } catch (e) { expect(e).to.be.an.instanceOf(Error); } }); diff --git a/lib/utils/renameService.test.js b/lib/utils/renameService.test.js index c8a4d7d1a..0eecc66cd 100644 --- a/lib/utils/renameService.test.js +++ b/lib/utils/renameService.test.js @@ -13,7 +13,6 @@ describe('renameService', () => { let cwd; let servicePath; - let newServicePath; beforeEach(() => { const tmpDir = testUtils.getTmpDirPath(); @@ -23,7 +22,6 @@ describe('renameService', () => { process.chdir(tmpDir); servicePath = tmpDir; - newServicePath = path.join(servicePath, 'new-service-name'); serverless = new Serverless(); serverless.init();