fix(workflows-sdk): Value resolver should resolve non StepResponse (#6726)

This commit is contained in:
Adrien de Peretti
2024-03-18 21:07:04 +01:00
committed by GitHub
parent 0c705d7bd4
commit 4b06c17dc0
5 changed files with 38 additions and 27 deletions
@@ -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"],