fix(workflows-sdk): Value resolver should resolve non StepResponse (#6726)
This commit is contained in:
@@ -6,6 +6,7 @@ import { knex } from "knex"
|
||||
import { setTimeout } from "timers/promises"
|
||||
import "../__fixtures__"
|
||||
import { DB_URL, TestDatabase } from "../utils"
|
||||
import { workflow2Step2Invoke, workflow2Step3Invoke } from "../__fixtures__"
|
||||
|
||||
const sharedPgConnection = knex<any, any>({
|
||||
client: "pg",
|
||||
@@ -124,6 +125,17 @@ describe("Workflow Orchestrator module", function () {
|
||||
stepResponse: { uhuuuu: "yeaah!" },
|
||||
})
|
||||
|
||||
expect(workflow2Step2Invoke).toBeCalledTimes(2)
|
||||
expect(workflow2Step2Invoke.mock.calls[0][0]).toEqual({ hey: "oh" })
|
||||
expect(workflow2Step2Invoke.mock.calls[1][0]).toEqual({
|
||||
hey: "async hello",
|
||||
})
|
||||
|
||||
expect(workflow2Step3Invoke).toBeCalledTimes(1)
|
||||
expect(workflow2Step3Invoke.mock.calls[0][0]).toEqual({
|
||||
uhuuuu: "yeaah!",
|
||||
})
|
||||
|
||||
executionsList = await query({
|
||||
workflow_executions: {
|
||||
fields: ["id"],
|
||||
|
||||
Reference in New Issue
Block a user