From 4c013cbb47b9454b947e085e4eb1717c7d16a21c Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Fri, 4 Sep 2026 04:53:06 +0000 Subject: [PATCH] test: pass the project root to the composed configs in the plugin-registry test #518 made cwd required on composeEntryLibConfig and composeMcpAppsRsbuildConfig; #509's framework-plugin-registration test landed beside it without the argument, so main no longer typechecks. --- .../tests/framework-plugin-registration.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/agent-bundle/tests/framework-plugin-registration.test.ts b/packages/agent-bundle/tests/framework-plugin-registration.test.ts index 31e4b1adb..4c45e1175 100644 --- a/packages/agent-bundle/tests/framework-plugin-registration.test.ts +++ b/packages/agent-bundle/tests/framework-plugin-registration.test.ts @@ -44,12 +44,12 @@ describe('framework-owned Rsbuild plugin registry', () => { const owned = [...frameworkOwnedRsbuildPlugins.keys()].sort(byName); it('matches exactly the plugins every synthesized entry lib registers', () => { - const lib = composeEntryLibConfig(entry, { meta, outputRoot: '/staged/portable' }); + const lib = composeEntryLibConfig(entry, { cwd: '/project', meta, outputRoot: '/staged/portable' }); expect(registeredPluginNames(lib.plugins)).toEqual(owned); }); it('matches exactly the plugins a React-syntax MCP App view registers, and nothing for a plain view', () => { - const apps = composeMcpAppsRsbuildConfig([reactView, plainView], { meta, outDir: '/staged/portable' }); + const apps = composeMcpAppsRsbuildConfig([reactView, plainView], { cwd: '/project', meta, outDir: '/staged/portable' }); expect(registeredPluginNames(apps.environments?.[reactView.name]?.plugins)).toEqual(owned); expect(registeredPluginNames(apps.environments?.[plainView.name]?.plugins)).toEqual([]); // The framework registers plugins per environment, never at the root the @@ -58,8 +58,8 @@ describe('framework-owned Rsbuild plugin registry', () => { }); it('registers no framework-owned plugin twice on either path', () => { - const lib = composeEntryLibConfig(entry, { meta, outputRoot: '/staged/portable' }); - const apps = composeMcpAppsRsbuildConfig([reactView], { meta, outDir: '/staged/portable' }); + const lib = composeEntryLibConfig(entry, { cwd: '/project', meta, outputRoot: '/staged/portable' }); + const apps = composeMcpAppsRsbuildConfig([reactView], { cwd: '/project', meta, outDir: '/staged/portable' }); for (const names of [registeredPluginNames(lib.plugins), registeredPluginNames(apps.environments?.[reactView.name]?.plugins)]) { expect(new Set(names).size).toBe(names.length); }