Skip to content

Commit 4e5b823

Browse files
TrickSumoyaythomas
authored andcommitted
Update callback success message to JSON format
1 parent f14d836 commit 4e5b823

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

examples/typescript/testing/assertions/assert-callback.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ it("completes a callback from the test", async () => {
2828

2929
const callback = runner.getOperation("approval");
3030
await callback.waitForData(WaitingOperationStatus.SUBMITTED);
31-
await callback.sendCallbackSuccess("approved");
31+
await callback.sendCallbackSuccess(JSON.stringify({ approved: true }));
3232

3333
const result = await runPromise;
3434

3535
expect(result.getStatus()).toBe(ExecutionStatus.SUCCEEDED);
36-
expect(result.getResult()).toBe("approved");
36+
37+
const { approved } = JSON.parse(result.getResult());
38+
expect(approved).toBe(true);
3739
});

0 commit comments

Comments
 (0)