Skip to content

Commit f5125c4

Browse files
committed
Assert on exact metadata in step-handler test instead of any object
1 parent 33beb54 commit f5125c4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/aws-durable-execution-sdk-js/src/handlers/step-handler/step-handler.test.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import {
33
ExecutionContext,
44
StepSemantics,
55
OperationLifecycleState,
6+
OperationSubType,
67
} from "../../types";
7-
import { OperationStatus } from "@aws-sdk/client-lambda";
8+
import { OperationStatus, OperationType } from "@aws-sdk/client-lambda";
89
import { Context } from "aws-lambda";
910
import { createDefaultLogger } from "../../utils/logger/default-logger";
1011
import { Checkpoint } from "../../utils/checkpoint/checkpoint-helper";
@@ -167,7 +168,15 @@ describe("Step Handler", () => {
167168
expect(mockCheckpoint.markOperationState).toHaveBeenCalledWith(
168169
stepId,
169170
OperationLifecycleState.COMPLETED,
170-
expect.any(Object),
171+
{
172+
metadata: {
173+
stepId,
174+
type: OperationType.STEP,
175+
subType: OperationSubType.STEP,
176+
name: "test-step",
177+
parentId: undefined,
178+
},
179+
},
171180
);
172181
});
173182

0 commit comments

Comments
 (0)