From f6de06b0b1577554e794fce2cf1187741a0a4af7 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 6 Oct 2023 16:06:59 +0200 Subject: [PATCH] fix test --- code/lib/manager-api/src/tests/layout.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/lib/manager-api/src/tests/layout.test.ts b/code/lib/manager-api/src/tests/layout.test.ts index 97c4c6c15628..a1891558ecda 100644 --- a/code/lib/manager-api/src/tests/layout.test.ts +++ b/code/lib/manager-api/src/tests/layout.test.ts @@ -1,5 +1,6 @@ import { themes } from '@storybook/theming'; import type { API_Provider } from 'lib/types/src'; +import EventEmitter from 'events'; import type { SubAPI, SubState } from '../modules/layout'; import type { SubState as AddonsSubState } from '../modules/addons'; import { defaultLayoutState, init as initLayout } from '../modules/layout'; @@ -33,7 +34,10 @@ describe('layout API', () => { return currentState as unknown as State; }), } as unknown as Store; - provider = { getConfig: jest.fn(() => ({})) } as unknown as API_Provider; + provider = { + getConfig: jest.fn(() => ({})), + channel: new EventEmitter(), + } as unknown as API_Provider; layoutApi = initLayout({ store, provider,