test(release): align source checkout runtime expectations

This commit is contained in:
Peter Steinberger
2026-05-02 17:13:33 +01:00
parent c336ab9e46
commit b4d0935557
2 changed files with 14 additions and 6 deletions

View File

@@ -239,7 +239,7 @@ export const runGatewayWatchTmuxMain = (params = {}) => {
log(deps.stderr, `gateway:watch benchmark CPU profiles: ${resolvedArgs.benchmarkProfileDir}`);
}
if (TMUX_DISABLE_VALUES.has(String(deps.env.OPENCLAW_GATEWAY_WATCH_TMUX ?? "").toLowerCase())) {
if (TMUX_DISABLE_VALUES.has((deps.env.OPENCLAW_GATEWAY_WATCH_TMUX ?? "").toLowerCase())) {
return runForegroundWatcher({
args: deps.args,
cwd: deps.cwd,

View File

@@ -1,9 +1,10 @@
import fs from "node:fs";
import path from "node:path";
import { describe, expect, it } from "vitest";
import { loadOpenClawPlugins } from "./loader.js";
describe("source checkout bundled plugin runtime", () => {
it("loads enabled bundled plugins from built dist when available", () => {
it("loads enabled bundled plugins from built dist or source checkout", () => {
const registry = loadOpenClawPlugins({
cache: false,
onlyPluginIds: ["twitch"],
@@ -21,9 +22,16 @@ describe("source checkout bundled plugin runtime", () => {
status: "loaded",
origin: "bundled",
});
expect(twitch?.source).toContain(
`${path.sep}dist${path.sep}extensions${path.sep}twitch${path.sep}index.js`,
);
expect(twitch?.rootDir).toContain(`${path.sep}dist${path.sep}extensions${path.sep}twitch`);
const builtRuntime = path.join(process.cwd(), "dist", "extensions", "twitch", "index.js");
const expectedRuntime = fs.existsSync(builtRuntime)
? `${path.sep}dist${path.sep}extensions${path.sep}twitch${path.sep}index.js`
: `${path.sep}extensions${path.sep}twitch${path.sep}index.ts`;
const expectedRoot = fs.existsSync(builtRuntime)
? `${path.sep}dist${path.sep}extensions${path.sep}twitch`
: `${path.sep}extensions${path.sep}twitch`;
expect(twitch?.source).toContain(expectedRuntime);
expect(twitch?.rootDir).toContain(expectedRoot);
});
});