Skip to content

Commit f092592

Browse files
ashwin-antclaude
andauthored
fix: prevent test pollution by ensuring inputs are cloned (anthropics#499)
Always create a new object copy of defaultInputs to prevent mutations from affecting other tests. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent ef8c0a6 commit f092592

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/mockContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const createMockAutomationContext = (
7272

7373
const mergedInputs = overrides.inputs
7474
? { ...defaultInputs, ...overrides.inputs }
75-
: defaultInputs;
75+
: { ...defaultInputs };
7676

7777
return { ...baseContext, ...overrides, inputs: mergedInputs };
7878
};

0 commit comments

Comments
 (0)