1
0
Fork 0
mirror of synced 2024-07-04 05:50:57 +12:00

mock out pro call

This commit is contained in:
Peter Clement 2024-01-16 16:58:13 +00:00
parent 80c998b7e1
commit 61b34b3ead
2 changed files with 16 additions and 1 deletions

View file

@ -0,0 +1,12 @@
const actual = jest.requireActual("@budibase/pro")
const pro = {
...actual,
features: {
...actual.features,
isTriggerAutomationRunEnabled: () => {
return true
},
},
}
export = pro

View file

@ -34,7 +34,10 @@ describe("Test triggering an automation from another automation", () => {
it("should fail gracefully if the automation id is incorrect", async () => {
const inputs: any = { automation: { automationId: null, timeout: 12000 } }
const res = await setup.runStep(setup.actions.TRIGGER.stepId, inputs)
const res = await setup.runStep(
setup.actions.TRIGGER_AUTOMATION_RUN.stepId,
inputs
)
expect(res.success).toBe(false)
})
})