mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
test(release): align source checkout runtime expectations
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user