mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
test: tighten script empty array assertions
This commit is contained in:
@@ -140,6 +140,6 @@ describe("syncPluginVersions", () => {
|
||||
|
||||
const checkSummary = syncPluginVersions(rootDir, { write: false });
|
||||
|
||||
expect(checkSummary.changelogged).toEqual([]);
|
||||
expect(checkSummary.changelogged).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -888,10 +888,10 @@ describe("test-projects args", () => {
|
||||
});
|
||||
expect(
|
||||
resolveChangedTargetArgs(["--changed=origin/main"], process.cwd(), () => changedPaths),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
expect(
|
||||
buildVitestRunPlans(["--changed=origin/main"], process.cwd(), () => changedPaths),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps core test-only changes on their owning test lane", () => {
|
||||
|
||||
@@ -60,7 +60,7 @@ describe("bundled plugin assets", () => {
|
||||
await withPluginAssetFixture(async (rootDir) => {
|
||||
await expect(
|
||||
readBundledPluginAssetHooks({ phase: "copy", plugins: ["missing"], rootDir }),
|
||||
).resolves.toEqual([]);
|
||||
).resolves.toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ describe("check-cli-bootstrap-imports", () => {
|
||||
writeFixture(root, "dist/light.js", `import path from "node:path";\nvoid path;\n`);
|
||||
writeGatewayRunChunk(root);
|
||||
|
||||
expect(collectCliBootstrapExternalImportErrors({ rootDir: root })).toEqual([]);
|
||||
expect(collectGatewayRunChunkBudgetErrors({ rootDir: root })).toEqual([]);
|
||||
expect(collectCliBootstrapExternalImportErrors({ rootDir: root })).toStrictEqual([]);
|
||||
expect(collectGatewayRunChunkBudgetErrors({ rootDir: root })).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("reports external packages in the static bootstrap graph", () => {
|
||||
|
||||
@@ -24,7 +24,7 @@ describe("check-dynamic-import-warts", () => {
|
||||
return (await import("./runtime.js")).createRuntime();
|
||||
}
|
||||
`;
|
||||
expect(findDynamicImportAdvisories(source)).toEqual([]);
|
||||
expect(findDynamicImportAdvisories(source)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("flags repeated direct dynamic imports", () => {
|
||||
@@ -52,7 +52,7 @@ describe("check-dynamic-import-warts", () => {
|
||||
return runtimePromise;
|
||||
}
|
||||
`;
|
||||
expect(findDynamicImportAdvisories(source)).toEqual([]);
|
||||
expect(findDynamicImportAdvisories(source)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("flags direct dynamic imports inside execute paths", () => {
|
||||
@@ -87,6 +87,6 @@ describe("check-dynamic-import-warts", () => {
|
||||
};
|
||||
}
|
||||
`;
|
||||
expect(findDynamicImportAdvisories(source)).toEqual([]);
|
||||
expect(findDynamicImportAdvisories(source)).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -39,7 +39,7 @@ describe("check-no-conflict-markers", () => {
|
||||
findConflictMarkerLines(
|
||||
["Example:", " <<<<<<< HEAD", "const text = '======= not a conflict';"].join("\n"),
|
||||
),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("scans text files and skips binary files", () => {
|
||||
|
||||
@@ -34,7 +34,7 @@ describe("check-no-random-messaging-tmp", () => {
|
||||
// os.tmpdir()
|
||||
const text = "tmpdir()";
|
||||
`;
|
||||
expect(findMessagingTmpdirCallLines(source)).toEqual([]);
|
||||
expect(findMessagingTmpdirCallLines(source)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("ignores tmpdir symbols that are not imported from node:os", () => {
|
||||
@@ -42,7 +42,7 @@ describe("check-no-random-messaging-tmp", () => {
|
||||
const tmpdir = () => "/tmp";
|
||||
const dir = tmpdir();
|
||||
`;
|
||||
expect(findMessagingTmpdirCallLines(source)).toEqual([]);
|
||||
expect(findMessagingTmpdirCallLines(source)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("guards src/media against host tmpdir usage", () => {
|
||||
|
||||
@@ -25,7 +25,7 @@ describe("check-no-raw-window-open", () => {
|
||||
// window.open("https://example.com")
|
||||
const text = "window.open('https://example.com')";
|
||||
`;
|
||||
expect(findRawWindowOpenLines(source)).toEqual([]);
|
||||
expect(findRawWindowOpenLines(source)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("handles parenthesized and asserted window references", () => {
|
||||
|
||||
@@ -13,7 +13,7 @@ const validRule = {
|
||||
|
||||
describe("check-opengrep-rule-metadata", () => {
|
||||
it("accepts GHSA-backed rules with durable source metadata", () => {
|
||||
expect(validateRuleMetadata([validRule])).toEqual([]);
|
||||
expect(validateRuleMetadata([validRule])).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("requires source metadata on every compiled rule", () => {
|
||||
@@ -46,7 +46,7 @@ describe("check-opengrep-rule-metadata", () => {
|
||||
},
|
||||
},
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps the source id, rule id, and GHSA advisory URL consistent", () => {
|
||||
|
||||
@@ -42,7 +42,7 @@ describe("check-runtime-sidecar-loaders", () => {
|
||||
"src/tasks/task-registry.ts",
|
||||
new Set(["src/tasks/task-registry-control.runtime.ts"]),
|
||||
),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("resolves candidate arrays used by source/build fallback loops", () => {
|
||||
@@ -81,7 +81,7 @@ describe("check-runtime-sidecar-loaders", () => {
|
||||
|
||||
expect(
|
||||
findRuntimeSidecarLoaderViolations(source, "src/tasks/task-registry.ts", new Set()),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("collects explicit tsdown entry sources", () => {
|
||||
|
||||
@@ -279,7 +279,7 @@ describe("scripts/lib/docker-e2e-plan", () => {
|
||||
)
|
||||
.filter(({ script }) => !scripts[script]);
|
||||
|
||||
expect(missing).toEqual([]);
|
||||
expect(missing).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps legacy release chunk names as aggregate aliases", () => {
|
||||
|
||||
@@ -202,7 +202,7 @@ describe("plugin gateway gauntlet helpers", () => {
|
||||
},
|
||||
);
|
||||
|
||||
expect(observations).toEqual([]);
|
||||
expect(observations).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("flags QA gateway regressions relative to an explicit baseline", () => {
|
||||
|
||||
@@ -224,7 +224,7 @@ snapshots:
|
||||
});
|
||||
|
||||
expect(exitCode).toBe(1);
|
||||
expect(stdoutChunks).toEqual([]);
|
||||
expect(stdoutChunks).toStrictEqual([]);
|
||||
expect(stderrChunks.join("")).toContain("Found 1 high or higher advisories");
|
||||
} finally {
|
||||
await rm(tempDir, { recursive: true, force: true });
|
||||
|
||||
@@ -266,7 +266,7 @@ describe("collectRootDependencyOwnershipCheckErrors", () => {
|
||||
sections: ["extensions"],
|
||||
},
|
||||
]);
|
||||
expect(collectRootDependencyOwnershipCheckErrors(records)).toEqual([]);
|
||||
expect(collectRootDependencyOwnershipCheckErrors(records)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("allows runtime deps for bundled plugins that are still packaged in core", () => {
|
||||
@@ -301,7 +301,7 @@ describe("collectRootDependencyOwnershipCheckErrors", () => {
|
||||
sections: ["extensions"],
|
||||
},
|
||||
]);
|
||||
expect(collectRootDependencyOwnershipCheckErrors(records)).toEqual([]);
|
||||
expect(collectRootDependencyOwnershipCheckErrors(records)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps excluded bundled plugin deps localizable", () => {
|
||||
|
||||
@@ -32,7 +32,7 @@ describe("scripts/run-vitest", () => {
|
||||
OPENCLAW_VITEST_ENABLE_MAGLEV: "1",
|
||||
PATH: "/usr/bin",
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("parses the optional no-output timeout env", () => {
|
||||
|
||||
@@ -173,7 +173,7 @@ snapshots:
|
||||
|
||||
const report = collectSbomRiskReport({ repoRoot });
|
||||
|
||||
expect(report.ownershipGaps).toEqual([]);
|
||||
expect(report.ownershipGaps).toStrictEqual([]);
|
||||
expect(report.staleOwnershipRecords).toEqual(["removed-lib"]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -300,7 +300,7 @@ describe("scripts/test-projects changed-target routing", () => {
|
||||
resolveChangedTargetArgs(["--changed", "origin/main"], process.cwd(), () => [
|
||||
"test/helpers/poll.ts",
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps the broad changed run available for shared test helpers", () => {
|
||||
@@ -366,7 +366,7 @@ describe("scripts/test-projects changed-target routing", () => {
|
||||
resolveChangedTargetArgs(["--changed", "origin/main"], process.cwd(), () => [
|
||||
"unknown/file.txt",
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps the broad changed run available for unknown root surfaces", () => {
|
||||
@@ -385,13 +385,13 @@ describe("scripts/test-projects changed-target routing", () => {
|
||||
resolveChangedTargetArgs(["--changed", "origin/main"], process.cwd(), () => [
|
||||
"docs/help/testing.md",
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("skips root agent guidance changes instead of broad-running tests", () => {
|
||||
expect(
|
||||
buildVitestRunPlans(["--changed", "origin/main"], process.cwd(), () => ["AGENTS.md"]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("skips app-only changes because app tests are separate from Vitest lanes", () => {
|
||||
@@ -399,7 +399,7 @@ describe("scripts/test-projects changed-target routing", () => {
|
||||
buildVitestRunPlans(["--changed", "origin/main"], process.cwd(), () => [
|
||||
"apps/macos/OpenClaw/AppDelegate.swift",
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps public plugin SDK changes focused by default", () => {
|
||||
@@ -981,8 +981,8 @@ describe("scripts/test-projects full-suite sharding", () => {
|
||||
.map(([file, configs]) => `${file}: ${configs.join(", ")}`)
|
||||
.toSorted((left, right) => left.localeCompare(right));
|
||||
|
||||
expect(missing).toEqual([]);
|
||||
expect(duplicated).toEqual([]);
|
||||
expect(missing).toStrictEqual([]);
|
||||
expect(duplicated).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("uses the large host-aware local profile on roomy local hosts", () => {
|
||||
|
||||
@@ -33,7 +33,7 @@ describe("collectPluginNpmPublishedRuntimeErrors", () => {
|
||||
},
|
||||
files: ["package.json", "index.ts", "dist/index.js"],
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("flags missing explicit runtimeExtensions outputs", () => {
|
||||
|
||||
Reference in New Issue
Block a user