mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:50:43 +00:00
perf(test): speed up secrets and mattermost lanes
This commit is contained in:
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,7 +5,6 @@ export function createSecretsVitestConfig(env?: Record<string, string | undefine
|
||||
dir: "src/secrets",
|
||||
env,
|
||||
name: "secrets",
|
||||
pool: "forks",
|
||||
passWithNoTests: true,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user