diff --git a/tests/engine/mcp-view-builder.test.ts b/tests/engine/mcp-view-builder.test.ts index be52622..b5ba7f1 100644 --- a/tests/engine/mcp-view-builder.test.ts +++ b/tests/engine/mcp-view-builder.test.ts @@ -29,10 +29,16 @@ describe('mcp-view-builder', () => { expect(html).toContain('Waiting for data...'); }); - it('contains the App import from ext-apps', () => { + it('inlines the ext-apps bundle and exposes App globally', () => { const html = buildMcpView(minimalConfig); - expect(html).toContain('@modelcontextprotocol/ext-apps/app-with-deps'); + // The bundle is inlined (no external import URLs) — the loader strips the + // ESM export block and exposes App on globalThis.__bdsExtApp so the page + // script can instantiate it without a module specifier. + expect(html).toContain('__bdsExtApp'); expect(html).toContain('new App('); + // Must NOT reference an external CDN for the bundle (distribution isolation). + expect(html).not.toMatch(/]+src=["']https?:/i); + expect(html).not.toMatch(/]+href=["']https?:/i); }); it('contains accept and discard proposal handlers', () => {