perf(test): speed up secrets and mattermost lanes

This commit is contained in:
Peter Steinberger
2026-04-23 10:27:28 +01:00
parent d1ff0caecb
commit 007fb0458e
2 changed files with 6 additions and 10 deletions

View File

@@ -1,14 +1,11 @@
import { describe, expect, it } from "vitest";
import { runDirectImportSmoke } from "../../test/helpers/plugins/direct-smoke.js";
describe("mattermost bundled api seam", () => {
it("loads the narrow channel plugin api in direct smoke", async () => {
const stdout = await runDirectImportSmoke(
'const mod = await import("./extensions/mattermost/channel-plugin-api.ts"); process.stdout.write(JSON.stringify({keys:Object.keys(mod).sort(), id: mod.mattermostPlugin.id, setupId: mod.mattermostSetupPlugin.id}));',
);
it("loads the narrow channel plugin api", async () => {
const mod = await import("./channel-plugin-api.js");
expect(stdout).toBe(
'{"keys":["mattermostPlugin","mattermostSetupPlugin"],"id":"mattermost","setupId":"mattermost"}',
);
}, 45_000);
expect(Object.keys(mod).toSorted()).toEqual(["mattermostPlugin", "mattermostSetupPlugin"]);
expect(mod.mattermostPlugin.id).toBe("mattermost");
expect(mod.mattermostSetupPlugin.id).toBe("mattermost");
});
});

View File

@@ -5,7 +5,6 @@ export function createSecretsVitestConfig(env?: Record<string, string | undefine
dir: "src/secrets",
env,
name: "secrets",
pool: "forks",
passWithNoTests: true,
});
}