From a78fcafbca44f01150bbda050c636110edcd1fb9 Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Mon, 3 Aug 2026 17:44:03 +0300 Subject: [PATCH] test(editor): Add the missing setNotify stub to the app init useToast mock (no-changelog) (#35448) Co-authored-by: Claude Opus 5 --- packages/frontend/editor-ui/src/app/init/index.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/frontend/editor-ui/src/app/init/index.test.ts b/packages/frontend/editor-ui/src/app/init/index.test.ts index 628f6a2a536..988cc940917 100644 --- a/packages/frontend/editor-ui/src/app/init/index.test.ts +++ b/packages/frontend/editor-ui/src/app/init/index.test.ts @@ -28,6 +28,12 @@ const showToast = vi.fn(); vi.mock('@n8n/composables/useToast', () => ({ useToast: () => ({ showMessage, showToast }), + // The factory replaces the whole module, so it has to name every export the + // real one has. Nothing here asserts on `setNotify` — its only caller, + // `toastNotifier`, is kept out of this graph by the mock below — so dropping + // this line looks safe and stays green. Loosen that mock and it is not: + // vitest fails every test with `No "setNotify" export is defined`. + setNotify: vi.fn(), })); vi.mock('@/app/init/toastNotifier', () => ({