From 9ab44ea9d675cd9d560e22fba50d057f1764f25c Mon Sep 17 00:00:00 2001 From: Harold Mciver Date: Wed, 16 Jul 2025 22:40:56 -0400 Subject: updated `/quit` to use new slash command arch (#4259) Co-authored-by: Abhi --- packages/cli/src/test-utils/mockCommandContext.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'packages/cli/src/test-utils/mockCommandContext.ts') diff --git a/packages/cli/src/test-utils/mockCommandContext.ts b/packages/cli/src/test-utils/mockCommandContext.ts index 88da4a32..899d5747 100644 --- a/packages/cli/src/test-utils/mockCommandContext.ts +++ b/packages/cli/src/test-utils/mockCommandContext.ts @@ -76,15 +76,13 @@ export const createMockCommandContext = ( const targetValue = output[key]; if ( - sourceValue && - typeof sourceValue === 'object' && - !Array.isArray(sourceValue) && - targetValue && - typeof targetValue === 'object' && - !Array.isArray(targetValue) + // We only want to recursivlty merge plain objects + Object.prototype.toString.call(sourceValue) === '[object Object]' && + Object.prototype.toString.call(targetValue) === '[object Object]' ) { output[key] = merge(targetValue, sourceValue); } else { + // If not, we do a direct assignment. This preserves Date objects and others. output[key] = sourceValue; } } -- cgit v1.2.3