mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-14 04:13:18 +08:00
重构主控编排与运行时预热链路,统一工作区提示词/专家调度协议并补齐 wiki 记忆注入与写回闭环。
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
This commit is contained in:
parent
4a23b715a2
commit
dbbe3add6a
14438 changed files with 2693620 additions and 2546 deletions
46
openclaw/test/vitest-extensions-config.test.ts
Normal file
46
openclaw/test/vitest-extensions-config.test.ts
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { bundledPluginFile } from "./helpers/bundled-plugin-paths.js";
|
||||
import { createPatternFileHelper } from "./helpers/pattern-file.js";
|
||||
import { loadIncludePatternsFromEnv } from "./vitest/vitest.extensions.config.ts";
|
||||
|
||||
const patternFiles = createPatternFileHelper("openclaw-vitest-extensions-config-");
|
||||
|
||||
afterEach(() => {
|
||||
patternFiles.cleanup();
|
||||
});
|
||||
|
||||
describe("extensions vitest include patterns", () => {
|
||||
it("returns null when no include file is configured", () => {
|
||||
expect(loadIncludePatternsFromEnv({})).toBeNull();
|
||||
});
|
||||
|
||||
it("loads include patterns from a JSON file", () => {
|
||||
const filePath = patternFiles.writePatternFile("include.json", [
|
||||
bundledPluginFile("feishu", "index.test.ts"),
|
||||
42,
|
||||
"",
|
||||
bundledPluginFile("msteams", "src/monitor.test.ts"),
|
||||
]);
|
||||
|
||||
expect(
|
||||
loadIncludePatternsFromEnv({
|
||||
OPENCLAW_VITEST_INCLUDE_FILE: filePath,
|
||||
}),
|
||||
).toEqual([
|
||||
bundledPluginFile("feishu", "index.test.ts"),
|
||||
bundledPluginFile("msteams", "src/monitor.test.ts"),
|
||||
]);
|
||||
});
|
||||
|
||||
it("throws when the configured file is not a JSON array", () => {
|
||||
const filePath = patternFiles.writePatternFile("include.json", {
|
||||
include: [bundledPluginFile("feishu", "index.test.ts")],
|
||||
});
|
||||
|
||||
expect(() =>
|
||||
loadIncludePatternsFromEnv({
|
||||
OPENCLAW_VITEST_INCLUDE_FILE: filePath,
|
||||
}),
|
||||
).toThrow(/JSON array/u);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue