mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: tighten release empty array assertions
This commit is contained in:
@@ -162,7 +162,7 @@ describe("buildOfficialChannelCatalog", () => {
|
||||
expect(entries.length).toBeGreaterThan(0);
|
||||
for (const entry of entries) {
|
||||
const installSource = describePluginInstallSource(requireInstall(entry));
|
||||
expect(installSource.warnings).toEqual([]);
|
||||
expect(installSource.warnings).toStrictEqual([]);
|
||||
expect(requireNpmInstallSource(installSource).pinState).toBe("exact-with-integrity");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -139,7 +139,7 @@ describe("collectInstalledContextEngineRuntimeErrors", () => {
|
||||
"utf8",
|
||||
);
|
||||
|
||||
expect(collectInstalledContextEngineRuntimeErrors(packageRoot)).toEqual([]);
|
||||
expect(collectInstalledContextEngineRuntimeErrors(packageRoot)).toStrictEqual([]);
|
||||
} finally {
|
||||
rmSync(packageRoot, { recursive: true, force: true });
|
||||
}
|
||||
@@ -220,7 +220,7 @@ describe("collectInstalledRootDependencyManifestErrors", () => {
|
||||
"utf8",
|
||||
);
|
||||
|
||||
expect(collectInstalledRootDependencyManifestErrors(packageRoot)).toEqual([]);
|
||||
expect(collectInstalledRootDependencyManifestErrors(packageRoot)).toStrictEqual([]);
|
||||
} finally {
|
||||
rmSync(packageRoot, { recursive: true, force: true });
|
||||
}
|
||||
@@ -246,7 +246,7 @@ describe("collectInstalledRootDependencyManifestErrors", () => {
|
||||
"utf8",
|
||||
);
|
||||
|
||||
expect(collectInstalledRootDependencyManifestErrors(packageRoot)).toEqual([]);
|
||||
expect(collectInstalledRootDependencyManifestErrors(packageRoot)).toStrictEqual([]);
|
||||
} finally {
|
||||
rmSync(packageRoot, { recursive: true, force: true });
|
||||
}
|
||||
@@ -301,7 +301,7 @@ describe("collectInstalledRootDependencyManifestErrors", () => {
|
||||
"utf8",
|
||||
);
|
||||
|
||||
expect(collectInstalledRootDependencyManifestErrors(packageRoot)).toEqual([]);
|
||||
expect(collectInstalledRootDependencyManifestErrors(packageRoot)).toStrictEqual([]);
|
||||
} finally {
|
||||
rmSync(packageRoot, { recursive: true, force: true });
|
||||
}
|
||||
@@ -326,7 +326,7 @@ describe("collectInstalledRootDependencyManifestErrors", () => {
|
||||
"utf8",
|
||||
);
|
||||
|
||||
expect(collectInstalledRootDependencyManifestErrors(packageRoot)).toEqual([]);
|
||||
expect(collectInstalledRootDependencyManifestErrors(packageRoot)).toStrictEqual([]);
|
||||
} finally {
|
||||
rmSync(packageRoot, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ describe("collectControlUiPackErrors", () => {
|
||||
"dist/control-ui/assets/index-Bu8rSoJV.js",
|
||||
"dist/control-ui/assets/index-BK0yXA_h.css",
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -486,7 +486,7 @@ describe("collectPackedTestCargoErrors", () => {
|
||||
"dist/extensions/whatsapp/node_modules/pino/lib/proto.js",
|
||||
"dist/extensions/webhooks/node_modules/zod/v4/core/api.js",
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("allows legitimate package roots named test under node_modules", () => {
|
||||
@@ -495,7 +495,7 @@ describe("collectPackedTestCargoErrors", () => {
|
||||
"dist/extensions/fixture-plugin/node_modules/direct/node_modules/test/index.js",
|
||||
"dist/extensions/fixture-plugin/node_modules/direct/node_modules/@scope/tests/index.js",
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("allows leaf runtime filenames named test or tests", () => {
|
||||
@@ -504,7 +504,7 @@ describe("collectPackedTestCargoErrors", () => {
|
||||
"dist/extensions/fixture-plugin/node_modules/direct/bin/test",
|
||||
"dist/extensions/fixture-plugin/node_modules/direct/bin/tests",
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("normalizes Windows or mixed separators before classifying test cargo", () => {
|
||||
@@ -529,7 +529,7 @@ describe("collectReleaseTagErrors", () => {
|
||||
releaseTag: "v2026.3.10",
|
||||
now: new Date("2026-03-11T12:00:00Z"),
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("rejects versions outside the two-day CalVer window", () => {
|
||||
@@ -549,7 +549,7 @@ describe("collectReleaseTagErrors", () => {
|
||||
releaseTag: "v2026.3.10-1",
|
||||
now: new Date("2026-03-10T00:00:00Z"),
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("accepts correction package versions paired with matching correction tags", () => {
|
||||
@@ -559,7 +559,7 @@ describe("collectReleaseTagErrors", () => {
|
||||
releaseTag: "v2026.3.10-1",
|
||||
now: new Date("2026-03-10T00:00:00Z"),
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("rejects beta package versions paired with fallback correction tags", () => {
|
||||
@@ -583,7 +583,7 @@ describe("collectReleasePackageMetadataErrors", () => {
|
||||
repository: { url: "git+https://github.com/openclaw/openclaw.git" },
|
||||
bin: { openclaw: "openclaw.mjs" },
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("rejects node-llama-cpp as a peer dependency", () => {
|
||||
|
||||
@@ -8,7 +8,7 @@ describe("collectPreparedPrepackErrors", () => {
|
||||
["dist/index.mjs", "dist/control-ui/index.html"],
|
||||
["dist/control-ui/assets/index-Bu8rSoJV.js"],
|
||||
),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("reports missing build and control ui artifacts", () => {
|
||||
|
||||
@@ -50,7 +50,7 @@ describe("resolveChangedClawHubPublishablePluginPackages", () => {
|
||||
plugins: publishablePlugins,
|
||||
changedPaths: ["pnpm-lock.yaml"],
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -245,7 +245,7 @@ describe("collectClawHubVersionGateErrors", () => {
|
||||
gitRange: { baseRef, headRef },
|
||||
});
|
||||
|
||||
expect(errors).toEqual([]);
|
||||
expect(errors).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("does not require a version bump for shared release-tooling changes", () => {
|
||||
@@ -258,7 +258,7 @@ describe("collectClawHubVersionGateErrors", () => {
|
||||
gitRange: { baseRef, headRef },
|
||||
});
|
||||
|
||||
expect(errors).toEqual([]);
|
||||
expect(errors).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -322,7 +322,7 @@ describe("collectPluginClawHubReleasePlan", () => {
|
||||
registryBaseUrl: "https://clawhub.ai",
|
||||
});
|
||||
|
||||
expect(plan.candidates).toEqual([]);
|
||||
expect(plan.candidates).toStrictEqual([]);
|
||||
expect(plan.skippedPublished).toHaveLength(1);
|
||||
expect(plan.skippedPublished[0]).toMatchObject({
|
||||
packageName: "@openclaw/demo-plugin",
|
||||
@@ -403,7 +403,7 @@ describe("collectClawHubOpenClawOwnerErrors", () => {
|
||||
}),
|
||||
});
|
||||
|
||||
expect(errors).toEqual([]);
|
||||
expect(errors).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ afterEach(() => {
|
||||
|
||||
describe("parsePluginReleaseSelection", () => {
|
||||
it("returns an empty list for blank input", () => {
|
||||
expect(parsePluginReleaseSelection("")).toEqual([]);
|
||||
expect(parsePluginReleaseSelection(" ")).toEqual([]);
|
||||
expect(parsePluginReleaseSelection(undefined)).toEqual([]);
|
||||
expect(parsePluginReleaseSelection("")).toStrictEqual([]);
|
||||
expect(parsePluginReleaseSelection(" ")).toStrictEqual([]);
|
||||
expect(parsePluginReleaseSelection(undefined)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("dedupes and sorts comma or whitespace separated package names", () => {
|
||||
@@ -107,7 +107,7 @@ describe("collectPublishablePluginPackageErrors", () => {
|
||||
},
|
||||
},
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("flags invalid publishable plugin metadata", () => {
|
||||
@@ -207,7 +207,7 @@ describe("collectPublishablePluginPackages", () => {
|
||||
),
|
||||
).filter((entry) => !packageFiles.has(entry));
|
||||
|
||||
expect(missingExclusions).toEqual([]);
|
||||
expect(missingExclusions).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("collects publishable npm plugins from extension package manifests", () => {
|
||||
@@ -312,7 +312,7 @@ describe("collectPublishablePluginPackages", () => {
|
||||
collectPublishablePluginPackages(repoDir, {
|
||||
extensionIds: [],
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("publishes alpha plugin packages to the alpha dist-tag", () => {
|
||||
@@ -443,6 +443,6 @@ describe("resolveChangedPublishablePluginPackages", () => {
|
||||
plugins: publishablePlugins,
|
||||
changedExtensionIds: [],
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -49,7 +49,7 @@ describe("collectAppcastSparkleVersionErrors", () => {
|
||||
it("accepts legacy 9-digit calver builds before lane-floor cutover", () => {
|
||||
const xml = `<rss><channel>${makeItem("2026.2.26", "202602260")}</channel></rss>`;
|
||||
|
||||
expect(collectAppcastSparkleVersionErrors(xml)).toEqual([]);
|
||||
expect(collectAppcastSparkleVersionErrors(xml)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("requires lane-floor builds on and after lane-floor cutover", () => {
|
||||
@@ -63,7 +63,7 @@ describe("collectAppcastSparkleVersionErrors", () => {
|
||||
it("accepts canonical stable lane builds on and after lane-floor cutover", () => {
|
||||
const xml = `<rss><channel>${makeItem("2026.3.1", "2026030190")}</channel></rss>`;
|
||||
|
||||
expect(collectAppcastSparkleVersionErrors(xml)).toEqual([]);
|
||||
expect(collectAppcastSparkleVersionErrors(xml)).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -237,7 +237,7 @@ describe("collectBundledExtensionManifestErrors", () => {
|
||||
},
|
||||
},
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("flags non-object install metadata instead of throwing", () => {
|
||||
@@ -301,7 +301,7 @@ describe("bundled plugin package dependency checks", () => {
|
||||
"utf8",
|
||||
);
|
||||
|
||||
expect(collectInstalledRootDependencyManifestErrors(tempRoot)).toEqual([]);
|
||||
expect(collectInstalledRootDependencyManifestErrors(tempRoot)).toStrictEqual([]);
|
||||
} finally {
|
||||
rmSync(tempRoot, { recursive: true, force: true });
|
||||
}
|
||||
@@ -531,7 +531,7 @@ describe("collectMissingPackPaths", () => {
|
||||
"dist/channel-catalog.json",
|
||||
PACKAGE_DIST_INVENTORY_RELATIVE_PATH,
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("requires bundled plugin runtime sidecars that dynamic plugin boundaries resolve at runtime", () => {
|
||||
@@ -574,7 +574,7 @@ describe("collectPackUnpackedSizeErrors", () => {
|
||||
it("accepts pack results within the unpacked size budget", () => {
|
||||
expect(
|
||||
collectPackUnpackedSizeErrors([makePackResult("openclaw-2026.3.14.tgz", 120_354_302)]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("flags oversized pack results that risk low-memory startup failures", () => {
|
||||
|
||||
Reference in New Issue
Block a user