Skip to content

Commit

Permalink
fix(client-js): workflow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Niraj-Kamdar committed Jun 30, 2022
1 parent 07ce9e4 commit fb1a828
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/js/client/src/__tests__/e2e/workflow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ensAddresses,
providers
} from "@polywrap/test-env-js";
import { createPolywrapClient, PolywrapClient, PolywrapClientConfig } from "../..";
import { createPolywrapClient, JobResult, PolywrapClient, PolywrapClientConfig } from "../..";
import { outPropWorkflow, sanityWorkflow } from "./workflow-test-cases";

jest.setTimeout(200000);
Expand Down Expand Up @@ -89,17 +89,17 @@ describe("workflow", () => {
test("sanity workflow", async () => {
await client.run({
workflow: sanityWorkflow,
onExecution: async (id: string, data: unknown, error: unknown) => {
await tests[id](data, error);
onExecution: async (id: string, jobResult: JobResult) => {
await tests[id](jobResult.data, jobResult.error);
},
});
});

test("workflow with output propagation", async () => {
await client.run({
workflow: outPropWorkflow,
onExecution: async (id: string, data: unknown, error: unknown) => {
await tests[id](data, error);
onExecution: async (id: string, jobResult: JobResult) => {
await tests[id](jobResult.data, jobResult.error);
},
});
});
Expand Down

0 comments on commit fb1a828

Please sign in to comment.