mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:20:42 +00:00
test: align release assertions with beta metadata
This commit is contained in:
@@ -22,6 +22,7 @@ describe("resolveExtraParams", () => {
|
||||
expect(result).toEqual({
|
||||
parallel_tool_calls: true,
|
||||
text_verbosity: "low",
|
||||
transport: "sse",
|
||||
openaiWsWarmup: false,
|
||||
});
|
||||
});
|
||||
@@ -192,6 +193,7 @@ describe("resolveExtraParams", () => {
|
||||
openaiWsWarmup: false,
|
||||
parallel_tool_calls: true,
|
||||
text_verbosity: "low",
|
||||
transport: "sse",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,12 +1,25 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import {
|
||||
describeBundledMetadataOnlyChannelCatalogContract,
|
||||
describeChannelCatalogEntryContract,
|
||||
describeOfficialFallbackChannelCatalogContract,
|
||||
} from "./test-helpers/channel-catalog-contract.js";
|
||||
|
||||
function resolveWorkspacePrereleaseNpmSpec(pluginDir: string): string {
|
||||
const packageJson = JSON.parse(
|
||||
fs.readFileSync(path.join(process.cwd(), "extensions", pluginDir, "package.json"), "utf8"),
|
||||
) as { name?: string; version?: string; openclaw?: { install?: { npmSpec?: string } } };
|
||||
const npmSpec = packageJson.openclaw?.install?.npmSpec ?? packageJson.name;
|
||||
if (!npmSpec || !packageJson.version) {
|
||||
throw new Error(`missing package metadata for ${pluginDir}`);
|
||||
}
|
||||
return packageJson.version.includes("-") ? `${npmSpec}@${packageJson.version}` : npmSpec;
|
||||
}
|
||||
|
||||
describeChannelCatalogEntryContract({
|
||||
channelId: "msteams",
|
||||
npmSpec: "@openclaw/msteams",
|
||||
npmSpec: resolveWorkspacePrereleaseNpmSpec("msteams"),
|
||||
alias: "teams",
|
||||
});
|
||||
|
||||
|
||||
@@ -1121,7 +1121,7 @@ describe("update-cli", () => {
|
||||
expect(last).toBeDefined();
|
||||
const parsed = last as Record<string, unknown>;
|
||||
const channel = parsed.channel as { value?: unknown };
|
||||
expect(channel.value).toBe("stable");
|
||||
expect(channel.value).toBe("beta");
|
||||
},
|
||||
},
|
||||
] as const)("updateStatusCommand rendering: $name", runUpdateCliScenario);
|
||||
|
||||
@@ -79,11 +79,11 @@ describe("status-all format", () => {
|
||||
}),
|
||||
).toEqual({
|
||||
channelInfo: {
|
||||
channel: "stable",
|
||||
source: "config",
|
||||
label: "stable (config)",
|
||||
channel: "beta",
|
||||
source: "installed-version",
|
||||
label: "beta (installed version)",
|
||||
},
|
||||
channelLabel: "stable (config)",
|
||||
channelLabel: "beta (installed version)",
|
||||
gitLabel: "main · tag v1.2.3",
|
||||
updateLine: `git main · ↔ origin/main · behind 2 · npm update ${newerRegistryVersion}`,
|
||||
updateAvailable: true,
|
||||
@@ -374,7 +374,7 @@ describe("status-all format", () => {
|
||||
{ Item: "Version", Value: "1.0.0" },
|
||||
{ Item: "Dashboard", Value: "http://127.0.0.1:18789/" },
|
||||
{ Item: "Tailscale exposure", Value: "serve · box.tail.ts.net · https://box.tail.ts.net" },
|
||||
{ Item: "Channel", Value: "stable (config)" },
|
||||
{ Item: "Channel", Value: "beta (installed version)" },
|
||||
{ Item: "Git", Value: "main · tag v1.2.3" },
|
||||
{ Item: "Update", Value: "available · custom update" },
|
||||
{
|
||||
|
||||
@@ -82,7 +82,7 @@ describe("status-overview-surface", () => {
|
||||
{ Item: "OS", Value: "macOS · node 22" },
|
||||
{ Item: "Dashboard", Value: "http://127.0.0.1:18789/" },
|
||||
{ Item: "Tailscale exposure", Value: "muted(off · box.tail.ts.net)" },
|
||||
{ Item: "Channel", Value: "stable (config)" },
|
||||
{ Item: "Channel", Value: "beta (installed version)" },
|
||||
{ Item: "Git", Value: "main · tag v1.2.3" },
|
||||
{ Item: "Update", Value: "available · custom update" },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user