From 95dde09e498416902ea39e54540e66f5d81af767 Mon Sep 17 00:00:00 2001 From: lihbr Date: Thu, 19 Oct 2023 23:11:16 +0200 Subject: [PATCH] chore(plugin-kit): update log condition to exclude only during testing --- packages/plugin-kit/src/createSliceMachinePluginRunner.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/plugin-kit/src/createSliceMachinePluginRunner.ts b/packages/plugin-kit/src/createSliceMachinePluginRunner.ts index 9e08a16a61..c3957d9f3e 100644 --- a/packages/plugin-kit/src/createSliceMachinePluginRunner.ts +++ b/packages/plugin-kit/src/createSliceMachinePluginRunner.ts @@ -142,8 +142,11 @@ export class SliceMachinePluginRunner { )(resolve); plugin = raw.default || raw; } catch (error) { - // Only log in development and when plugin is unavailable through native plugins library (to prevent noise) - if (import.meta.env.DEV && !(resolve in this._nativePlugins)) { + // Only log in development, but not during tests when a native plugin matches. + if ( + import.meta.env.DEV && + !(import.meta.env.TEST && resolve in this._nativePlugins) + ) { console.error(error); } }