Skip to content

Commit

Permalink
chore(): unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
李佳明 committed Oct 29, 2024
1 parent eb332bf commit 2a87329
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions bricks/next-builder/src/shared/workbench/WorkbenchBackend.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,20 @@ describe("WorkbenchBackend should work", () => {
"",
],
});

backendInstance.push({
action: "update.formTemplate",
state: "pending",
args: [
"123",
{
id: "123",
projectInstanceId: "123",
formName: "123",
},
"",
],
});
await (global as any).flushPromises();

expect(mockUpdateFormItem).toHaveBeenCalledWith("123", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ export default class WorkbenchBackend {
});
return true;
} catch (e) {
this.handleError(e, "更新表单项失败");
this.handleError(e, "更新表单模板失败");
return false;
}
}
Expand Down

0 comments on commit 2a87329

Please sign in to comment.