From f0925925f14ac5e5ea38151c9c999935b05e54dc Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Wed, 27 Aug 2025 17:14:28 -0700 Subject: [PATCH] fix: prevent test pollution by ensuring inputs are cloned (#499) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- test/mockContext.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mockContext.ts b/test/mockContext.ts index 802748a..6d6e7e2 100644 --- a/test/mockContext.ts +++ b/test/mockContext.ts @@ -72,7 +72,7 @@ export const createMockAutomationContext = ( const mergedInputs = overrides.inputs ? { ...defaultInputs, ...overrides.inputs } - : defaultInputs; + : { ...defaultInputs }; return { ...baseContext, ...overrides, inputs: mergedInputs }; };