mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 01:21:36 +00:00
test: debrand plumbing labels and restore skill compat
This commit is contained in:
@@ -5,11 +5,11 @@ describe("resolveMessageSecretScope", () => {
|
||||
it("prefers explicit channel/account inputs", () => {
|
||||
expect(
|
||||
resolveMessageSecretScope({
|
||||
channel: "Discord",
|
||||
channel: "Signal",
|
||||
accountId: "Ops",
|
||||
}),
|
||||
).toEqual({
|
||||
channel: "discord",
|
||||
channel: "signal",
|
||||
accountId: "ops",
|
||||
});
|
||||
});
|
||||
@@ -17,27 +17,27 @@ describe("resolveMessageSecretScope", () => {
|
||||
it("infers channel from a prefixed target", () => {
|
||||
expect(
|
||||
resolveMessageSecretScope({
|
||||
target: "telegram:12345",
|
||||
target: "signal:12345",
|
||||
}),
|
||||
).toEqual({
|
||||
channel: "telegram",
|
||||
channel: "signal",
|
||||
});
|
||||
});
|
||||
|
||||
it("infers a shared channel from target arrays", () => {
|
||||
expect(
|
||||
resolveMessageSecretScope({
|
||||
targets: ["discord:one", "discord:two"],
|
||||
targets: ["signal:one", "signal:two"],
|
||||
}),
|
||||
).toEqual({
|
||||
channel: "discord",
|
||||
channel: "signal",
|
||||
});
|
||||
});
|
||||
|
||||
it("does not infer a channel when target arrays mix channels", () => {
|
||||
expect(
|
||||
resolveMessageSecretScope({
|
||||
targets: ["discord:one", "slack:two"],
|
||||
targets: ["signal:one", "imessage:two"],
|
||||
}),
|
||||
).toEqual({});
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
import { buildWorkspaceSkillStatus } from "../agents/skills-status.js";
|
||||
import type { SkillEntry } from "../agents/skills.js";
|
||||
@@ -39,9 +38,7 @@ describe("skills-cli (e2e)", () => {
|
||||
description: "Capture UI screenshots",
|
||||
filePath: path.join(baseDir, "SKILL.md"),
|
||||
baseDir,
|
||||
sourceInfo: createSyntheticSourceInfo(path.join(baseDir, "SKILL.md"), {
|
||||
source: "openclaw-bundled",
|
||||
}),
|
||||
source: "openclaw-bundled",
|
||||
disableModelInvocation: false,
|
||||
},
|
||||
frontmatter: {},
|
||||
|
||||
Reference in New Issue
Block a user