chore(workflows, core-flows): Split workflows tooling and definitions (#5705)

This commit is contained in:
Adrien de Peretti
2023-11-24 14:55:48 +01:00
committed by GitHub
parent fc1ef29ed9
commit ddbeed4ea6
138 changed files with 274 additions and 241 deletions
@@ -1,5 +1,5 @@
import { LocalWorkflow } from "../../workflow/local-workflow"
import { TransactionState } from "../../transaction/types"
import { LocalWorkflow } from "../../workflow/local-workflow"
import { WorkflowManager } from "../../workflow/workflow-manager"
describe("WorkflowManager", () => {
@@ -217,4 +217,18 @@ describe("WorkflowManager", () => {
WorkflowManager.getWorkflow("create-product")?.handlers_.has("xor")
).toEqual(false)
})
it("should return the final flow definition when calling getFlow()", async () => {
const flow = new LocalWorkflow("deliver-product", container)
expect(flow.getFlow()).toEqual({
action: "foo",
next: {
action: "callExternal",
async: true,
noCompensation: true,
next: { action: "bar" },
},
})
})
})