perf: split hooks, tui, and extension lanes

This commit is contained in:
Peter Steinberger
2026-04-04 05:38:36 +01:00
parent af102907c5
commit 22e6225dd0
16 changed files with 324 additions and 71 deletions

View File

@@ -70,6 +70,15 @@ describe("scripts/test-extension.mjs", () => {
expect(plan.hasTests).toBe(true);
});
it("resolves feishu onto the feishu vitest config", () => {
const plan = resolveExtensionTestPlan({ targetArg: "feishu", cwd: process.cwd() });
expect(plan.extensionId).toBe("feishu");
expect(plan.config).toBe("vitest.extension-feishu.config.ts");
expect(plan.roots).toContain(bundledPluginRoot("feishu"));
expect(plan.hasTests).toBe(true);
});
it("resolves provider extensions onto the provider vitest config", () => {
const plan = resolveExtensionTestPlan({ targetArg: "openai", cwd: process.cwd() });
@@ -106,6 +115,15 @@ describe("scripts/test-extension.mjs", () => {
expect(plan.hasTests).toBe(true);
});
it("resolves msteams onto the msteams vitest config", () => {
const plan = resolveExtensionTestPlan({ targetArg: "msteams", cwd: process.cwd() });
expect(plan.extensionId).toBe("msteams");
expect(plan.config).toBe("vitest.extension-msteams.config.ts");
expect(plan.roots).toContain(bundledPluginRoot("msteams"));
expect(plan.hasTests).toBe(true);
});
it("keeps non-provider extensions on the shared extensions vitest config", () => {
const plan = resolveExtensionTestPlan({ targetArg: "firecrawl", cwd: process.cwd() });
@@ -182,6 +200,8 @@ describe("scripts/test-extension.mjs", () => {
"matrix",
"telegram",
"memory-core",
"msteams",
"feishu",
"bluebubbles",
"acpx",
"diffs",
@@ -192,10 +212,12 @@ describe("scripts/test-extension.mjs", () => {
"acpx",
"bluebubbles",
"diffs",
"feishu",
"firecrawl",
"line",
"matrix",
"memory-core",
"msteams",
"openai",
"slack",
"telegram",
@@ -225,6 +247,12 @@ describe("scripts/test-extension.mjs", () => {
roots: [bundledPluginRoot("diffs")],
testFileCount: expect.any(Number),
},
{
config: "vitest.extension-feishu.config.ts",
extensionIds: ["feishu"],
roots: [bundledPluginRoot("feishu")],
testFileCount: expect.any(Number),
},
{
config: "vitest.extension-matrix.config.ts",
extensionIds: ["matrix"],
@@ -237,6 +265,12 @@ describe("scripts/test-extension.mjs", () => {
roots: [bundledPluginRoot("memory-core")],
testFileCount: expect.any(Number),
},
{
config: "vitest.extension-msteams.config.ts",
extensionIds: ["msteams"],
roots: [bundledPluginRoot("msteams")],
testFileCount: expect.any(Number),
},
{
config: "vitest.extension-providers.config.ts",
extensionIds: ["openai"],