diff --git a/packages/frontend-app-api/src/wiring/createApp.test.tsx b/packages/frontend-app-api/src/wiring/createApp.test.tsx index a7956137c4..244ce625fb 100644 --- a/packages/frontend-app-api/src/wiring/createApp.test.tsx +++ b/packages/frontend-app-api/src/wiring/createApp.test.tsx @@ -126,6 +126,25 @@ describe('createApp', () => { ).resolves.toBeInTheDocument(); }); + it('should propagate errors thrown by feature loaders', async () => { + const app = createApp({ + configLoader: async () => ({ + config: new MockConfigApi({}), + }), + features: [ + async () => { + throw new TypeError('boom'); + }, + ], + }); + + await expect( + renderWithEffects(app.createRoot()), + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Failed to read frontend features from loader, TypeError: boom"`, + ); + }); + it('should register feature flags', async () => { const app = createApp({ configLoader: async () => ({ config: new MockConfigApi({}) }),