chore(workflows, core-flows): Split workflows tooling and definitions (#5705)
This commit is contained in:
committed by
GitHub
parent
fc1ef29ed9
commit
ddbeed4ea6
@@ -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" },
|
||||
},
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user