mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-05 15:31:39 +00:00
* fix(ui): recover long-running sessions and dashboards * fix(ui): expose browser-safe gateway timers * refactor(ui): keep browser timer surface minimal * refactor(gateway): extract pending request state * fix(ci): refresh browser runtime and format baseline * fix(ci): exclude generated plugin outputs from targeted lint * fix(ui): bound long-running connection and pane lifecycles * refactor(ui): split long-running lifecycle regression coverage * fix(ui): bound long-running media and lint ownership * fix(security): preserve explicit workspace disable denylist * fix(ci): preserve plugin manifest fallback lint
51 lines
2.0 KiB
TypeScript
51 lines
2.0 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { detectChangedLanes } from "../../scripts/changed-lanes.mjs";
|
|
import { createChangedCheckPlan } from "../../scripts/check-changed.mjs";
|
|
|
|
describe("generated extension asset lint planning", () => {
|
|
it("still lints extension tests alongside a generated browser asset", () => {
|
|
const generatedAsset = "extensions/browser/chrome-extension/modules/copilot-runtime.js";
|
|
const extensionTest = "extensions/browser/chrome-extension/modules/copilot-gateway.test.ts";
|
|
const result = detectChangedLanes([generatedAsset, extensionTest]);
|
|
const plan = createChangedCheckPlan(result, { env: { PATH: "/usr/bin" } });
|
|
|
|
expect(result.lanes.extensionTests).toBe(true);
|
|
expect(plan.commands).toContainEqual(
|
|
expect.objectContaining({
|
|
name: "lint extension changed file",
|
|
args: [
|
|
"scripts/run-oxlint.mjs",
|
|
"--tsconfig",
|
|
"config/tsconfig/oxlint.extensions.json",
|
|
extensionTest,
|
|
],
|
|
}),
|
|
);
|
|
expect(
|
|
plan.commands
|
|
.filter((command) => command.args[0] === "scripts/run-oxlint.mjs")
|
|
.flatMap((command) => command.args),
|
|
).not.toContain(generatedAsset);
|
|
});
|
|
|
|
it("keeps fallback extension lint for a manifest beside a generated browser asset", () => {
|
|
const generatedAsset = "extensions/browser/chrome-extension/modules/copilot-runtime.js";
|
|
const manifest = "extensions/browser/openclaw.plugin.json";
|
|
const result = detectChangedLanes([generatedAsset, manifest]);
|
|
const plan = createChangedCheckPlan(result, { env: { PATH: "/usr/bin" } });
|
|
|
|
expect(result.lanes.extensions).toBe(true);
|
|
expect(plan.commands).toContainEqual(
|
|
expect.objectContaining({
|
|
name: "lint extensions",
|
|
args: ["lint:extensions"],
|
|
}),
|
|
);
|
|
expect(
|
|
plan.commands
|
|
.filter((command) => command.args[0] === "scripts/run-oxlint.mjs")
|
|
.flatMap((command) => command.args),
|
|
).not.toContain(generatedAsset);
|
|
});
|
|
});
|