diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index 4181c13f..2e0f19ce 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -44,4 +44,5 @@ export const messages = { LightningInterfaceBundle: 'A Lightning Interface Bundle', LightningTest: 'A Lightning Test', RawOutput: 'target dir = %s\n%s', + templateTypeNotFound: 'The template type does not exist', }; diff --git a/test/service/templateService.test.ts b/test/service/templateService.test.ts index 99fd168e..122b8aca 100644 --- a/test/service/templateService.test.ts +++ b/test/service/templateService.test.ts @@ -478,6 +478,12 @@ describe('TemplateService', () => { } }); + it('should return an error if the generator does not exist', () => { + chai + .expect(() => importGenerator(20 as TemplateType)) + .to.throw(Error, nls.localize('templateTypeNotFound')); + }); + it('should create AnalyticsTemplate', async () => { await remove(path.join('testsoutput', 'libraryCreate', 'waveTemplates')); const templateService = TemplateService.getInstance();