Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
NetaMolcho committed Jan 30, 2024
1 parent 5f7a6c4 commit 9d881e8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/yeomanui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export class YeomanUI {
return this.runGenerator(this.generatorName);
}

private async fromWizard(): Promise<boolean> {
private fromWizard(): boolean {
if (this.uiOptions.generator) return false;
return true;
}
Expand Down
16 changes: 8 additions & 8 deletions packages/backend/test/yeomanui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
});
Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/test/App.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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);
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 9d881e8

Please sign in to comment.