From ea5d53edf4b62a18a8e8205e8abc0ebdd60918f3 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Fri, 7 Jun 2024 00:42:55 +0800 Subject: [PATCH] Merge pull request #28091 from storybookjs/kasper/only-log-spies-with-names Addon-actions: Only log spies with names (cherry picked from commit 615d0d18f101739915cccfaf08519ccd3c2c2cde) --- code/addons/actions/src/loaders.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/code/addons/actions/src/loaders.ts b/code/addons/actions/src/loaders.ts index eebb09acb71b..a2d479367f9a 100644 --- a/code/addons/actions/src/loaders.ts +++ b/code/addons/actions/src/loaders.ts @@ -20,6 +20,7 @@ const logActionsWhenMockCalled: LoaderFunction = (context) => { const onMockCall = global.__STORYBOOK_TEST_ON_MOCK_CALL__ as typeof onMockCallType; onMockCall((mock, args) => { const name = mock.getMockName(); + if (name === 'spy') return; // TODO: Make this a configurable API in 8.2 if (