diff --git a/packages/backend/src/yeomanui.ts b/packages/backend/src/yeomanui.ts index a850b510..27a10679 100644 --- a/packages/backend/src/yeomanui.ts +++ b/packages/backend/src/yeomanui.ts @@ -393,7 +393,7 @@ export class YeomanUI { return this.runGenerator(this.generatorName); } - private async fromWizard(): Promise { + private fromWizard(): boolean { if (this.uiOptions.generator) return false; return true; } diff --git a/packages/backend/test/yeomanui.spec.ts b/packages/backend/test/yeomanui.spec.ts index 7aa6a89e..7b80dc48 100644 --- a/packages/backend/test/yeomanui.spec.ts +++ b/packages/backend/test/yeomanui.spec.ts @@ -914,29 +914,29 @@ describe("yeomanui unit test", () => { }); describe("fromWizard", () => { - it("from fiori generator", async () => { + it("from fiori generator", () => { const yeomanUiInstance: YeomanUI = new YeomanUI( rpc, youiEvents, outputChannel, testLogger, - {generator: "fiori"}, - flowPromise.state + { generator: "fiori" }, + flowPromise.state, ); - const res = await yeomanUiInstance["fromWizard"](); + const res = yeomanUiInstance["fromWizard"](); expect(res).to.be.false; }); - it("from application wizard", async () => { + it("from application wizard", () => { const yeomanUiInstance: YeomanUI = new YeomanUI( rpc, youiEvents, outputChannel, testLogger, - {generator: undefined}, - flowPromise.state + { generator: undefined }, + flowPromise.state, ); - const res = await yeomanUiInstance["fromWizard"](); + const res = yeomanUiInstance["fromWizard"](); expect(res).to.be.true; }); }); diff --git a/packages/frontend/test/App.spec.js b/packages/frontend/test/App.spec.js index 22b5a76c..b9156e86 100644 --- a/packages/frontend/test/App.spec.js +++ b/packages/frontend/test/App.spec.js @@ -722,7 +722,7 @@ describe("App.vue", () => { }); describe("back - method", () => { - test("promptIndex is 0 (Select Generator)", () => { + test("promptIndex is 0 (Select Generator)", async () => { wrapper = initComponent(App, {}, true); wrapper.vm.rpc = { invoke: jest.fn().mockImplementation(async () => { @@ -736,7 +736,7 @@ describe("App.vue", () => { wrapper.vm.promptIndex = 1; wrapper.vm.prompts = [{}, {}]; - wrapper.vm.back(); + await wrapper.vm.back(); expect(wrapper.vm.promptIndex).toBe(0); expect(wrapper.vm.prompts.length).toBe(0); @@ -827,8 +827,8 @@ describe("App.vue", () => { wrapper = initComponent(App, {}, true); wrapper.vm.rpc = { invoke: jest.fn().mockImplementation(async () => { - return true; - }), + return true; + }), registerMethod: jest.fn(), }; const err = new Error("error");