






















@@ -145,7 +145,7 @@ describe("packed CLI smoke", () => {
145145OPENCLAW_STATE_DIR: "/tmp/smoke-state",
146146},
147147),
148-).toMatchObject({
148+).toEqual({
149149PATH: "/usr/bin",
150150HOME: "/tmp/smoke-home",
151151OPENCLAW_STATE_DIR: "/tmp/smoke-state",
@@ -380,9 +380,9 @@ describe("collectForbiddenPackPaths", () => {
380380381381it("keeps local build metadata excluded by package files", () => {
382382const pkg = JSON.parse(readFileSync("package.json", "utf8")) as { files?: string[] };
383-expect(pkg.files).toEqual(
384-expect.arrayContaining(LOCAL_BUILD_METADATA_DIST_PATHS.map((entry) => `!${entry}`)),
385-);
383+for (const entry of LOCAL_BUILD_METADATA_DIST_PATHS) {
384+expect(pkg.files).toContain(`!${entry}`);
385+}
386386});
387387388388it("blocks legacy runtime dependency stamps from npm pack output", () => {
@@ -483,27 +483,27 @@ describe("collectMissingPackPaths", () => {
483483"dist/build-info.json",
484484]);
485485486-expect(missing).toEqual(
487-expect.arrayContaining([
488- "dist/channel-catalog.json",
489- PACKAGE_DIST_INVENTORY_RELATIVE_PATH,
490- "dist/control-ui/index.html",
491- "scripts/npm-runner.mjs",
492- "scripts/preinstall-package-manager-warning.mjs",
493- "scripts/lib/official-external-channel-catalog.json",
494- "scripts/lib/official-external-plugin-catalog.json",
495- "scripts/lib/official-external-provider-catalog.json",
496- "scripts/lib/package-dist-imports.mjs",
497- "scripts/postinstall-bundled-plugins.mjs",
498- "dist/task-registry-control.runtime.js",
499- bundledDistPluginFile("slack", "runtime-api.js"),
500- bundledDistPluginFile("slack", "openclaw.plugin.json"),
501- bundledDistPluginFile("slack", "package.json"),
502- bundledDistPluginFile("telegram", "runtime-api.js"),
503- bundledDistPluginFile("telegram", "openclaw.plugin.json"),
504- bundledDistPluginFile("telegram", "package.json"),
505-]),
506-);
486+for (const path of [
487+"dist/channel-catalog.json",
488+PACKAGE_DIST_INVENTORY_RELATIVE_PATH,
489+"dist/control-ui/index.html",
490+"scripts/npm-runner.mjs",
491+"scripts/preinstall-package-manager-warning.mjs",
492+"scripts/lib/official-external-channel-catalog.json",
493+"scripts/lib/official-external-plugin-catalog.json",
494+"scripts/lib/official-external-provider-catalog.json",
495+"scripts/lib/package-dist-imports.mjs",
496+"scripts/postinstall-bundled-plugins.mjs",
497+"dist/task-registry-control.runtime.js",
498+bundledDistPluginFile("slack", "runtime-api.js"),
499+bundledDistPluginFile("slack", "openclaw.plugin.json"),
500+bundledDistPluginFile("slack", "package.json"),
501+bundledDistPluginFile("telegram", "runtime-api.js"),
502+bundledDistPluginFile("telegram", "openclaw.plugin.json"),
503+bundledDistPluginFile("telegram", "package.json"),
504+]) {
505+expect(missing).toContain(path);
506+}
507507});
508508509509it("accepts the shipped upgrade surface when optional bundled metadata is present", () => {
@@ -535,11 +535,11 @@ describe("collectMissingPackPaths", () => {
535535});
536536537537it("requires bundled plugin runtime sidecars that dynamic plugin boundaries resolve at runtime", () => {
538-expect(requiredBundledPluginPackPaths).toEqual(
539-expect.arrayContaining([
540- bundledDistPluginFile("slack", "runtime-api.js"),
541- bundledDistPluginFile("telegram", "runtime-api.js"),
542-]),
538+expect(requiredBundledPluginPackPaths).toContain(
539+bundledDistPluginFile("slack", "runtime-api.js"),
540+);
541+expect(requiredBundledPluginPackPaths).toContain(
542+bundledDistPluginFile("telegram", "runtime-api.js"),
543543);
544544});
545545});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。