mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: tighten boundary empty array assertions
This commit is contained in:
@@ -60,7 +60,7 @@ describe("extension import boundary inventories", () => {
|
||||
|
||||
expect(jsonOutput.exitCode).toBe(0);
|
||||
expect(jsonOutput.stderr).toBe("");
|
||||
expect(jsonOutput.json).toEqual([]);
|
||||
expect(jsonOutput.json).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ describe("non-extension test boundaries", () => {
|
||||
})
|
||||
.filter((value): value is { file: string; imports: string[] } => value !== null);
|
||||
|
||||
expect(offenders).toEqual([]);
|
||||
expect(offenders).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps extension-owned onboard helper coverage out of the core onboard auth suite", () => {
|
||||
@@ -197,7 +197,7 @@ describe("non-extension test boundaries", () => {
|
||||
bannedPluginSdkModules.has(entry),
|
||||
);
|
||||
|
||||
expect(imports).toEqual([]);
|
||||
expect(imports).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps bundled plugin public-surface imports out of core source", () => {
|
||||
@@ -210,7 +210,7 @@ describe("non-extension test boundaries", () => {
|
||||
return findBundledPluginPublicSurfaceImports(source).length > 0;
|
||||
});
|
||||
|
||||
expect(offenders).toEqual([]);
|
||||
expect(offenders).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps bundled plugin sync test-api loaders out of core tests", () => {
|
||||
@@ -228,7 +228,7 @@ describe("non-extension test boundaries", () => {
|
||||
return source.includes("loadBundledPluginTestApiSync(");
|
||||
});
|
||||
|
||||
expect(offenders).toEqual([]);
|
||||
expect(offenders).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps resolver tests on generated fixtures for broad bundled plugin source APIs", () => {
|
||||
@@ -240,7 +240,7 @@ describe("non-extension test boundaries", () => {
|
||||
);
|
||||
});
|
||||
|
||||
expect(offenders).toEqual([]);
|
||||
expect(offenders).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps bundled channel security collector coverage under extension tests", () => {
|
||||
@@ -257,7 +257,7 @@ describe("non-extension test boundaries", () => {
|
||||
);
|
||||
});
|
||||
|
||||
expect(offenders).toEqual([]);
|
||||
expect(offenders).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps extension channel contract helpers on the public testing surface", () => {
|
||||
@@ -268,7 +268,7 @@ describe("non-extension test boundaries", () => {
|
||||
return source.includes("src/channels/plugins/contracts/test-helpers/");
|
||||
});
|
||||
|
||||
expect(offenders).toEqual([]);
|
||||
expect(offenders).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps extension tests off legacy broad testing barrels and repo helper bridges", () => {
|
||||
@@ -287,7 +287,7 @@ describe("non-extension test boundaries", () => {
|
||||
return bannedPatterns.some((pattern) => pattern.test(source));
|
||||
});
|
||||
|
||||
expect(offenders).toEqual([]);
|
||||
expect(offenders).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps extension root test-support helpers from reaching into private src trees", () => {
|
||||
@@ -302,7 +302,7 @@ describe("non-extension test boundaries", () => {
|
||||
})
|
||||
.filter((entry): entry is { file: string; imports: string[] } => entry !== null);
|
||||
|
||||
expect(offenders).toEqual([]);
|
||||
expect(offenders).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps bundled extension sources off deprecated channel config schema aliases", () => {
|
||||
@@ -313,6 +313,6 @@ describe("non-extension test boundaries", () => {
|
||||
return source.includes("openclaw/plugin-sdk/channel-config-schema-legacy");
|
||||
});
|
||||
|
||||
expect(offenders).toEqual([]);
|
||||
expect(offenders).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -40,7 +40,7 @@ describe("plugin extension import boundary inventory", () => {
|
||||
file === "src/plugins/bundled-web-search-registry.ts",
|
||||
);
|
||||
|
||||
expect(blockedShimFiles).toEqual([]);
|
||||
expect(blockedShimFiles).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("ignores boundary shims by scope", async () => {
|
||||
@@ -50,7 +50,7 @@ describe("plugin extension import boundary inventory", () => {
|
||||
(file) => file.startsWith("src/plugin-sdk/") || file.startsWith("src/plugin-sdk-internal/"),
|
||||
);
|
||||
|
||||
expect(boundaryShimFiles).toEqual([]);
|
||||
expect(boundaryShimFiles).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("produces stable sorted output", async () => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { createCapturedIo } from "./helpers/captured-io.js";
|
||||
|
||||
describe("test-helper extension import boundary inventory", () => {
|
||||
it("stays empty", async () => {
|
||||
expect(await collectTestHelperExtensionImportBoundaryInventory()).toEqual([]);
|
||||
expect(await collectTestHelperExtensionImportBoundaryInventory()).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("script json output stays empty", async () => {
|
||||
@@ -16,6 +16,6 @@ describe("test-helper extension import boundary inventory", () => {
|
||||
|
||||
expect(exitCode).toBe(0);
|
||||
expect(captured.readStderr()).toBe("");
|
||||
expect(JSON.parse(captured.readStdout())).toEqual([]);
|
||||
expect(JSON.parse(captured.readStdout())).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -45,7 +45,7 @@ describe("loadIncludePatternsFromEnv", () => {
|
||||
|
||||
describe("loadExtraExcludePatternsFromEnv", () => {
|
||||
it("returns an empty list when no extra exclude file is configured", () => {
|
||||
expect(loadExtraExcludePatternsFromEnv({})).toEqual([]);
|
||||
expect(loadExtraExcludePatternsFromEnv({})).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("loads extra exclude patterns from a JSON file", () => {
|
||||
|
||||
@@ -55,7 +55,7 @@ describe("unit-fast vitest lane", () => {
|
||||
|
||||
expect(testConfig.isolate).toBe(false);
|
||||
expect(testConfig.runner).toBeUndefined();
|
||||
expect(testConfig.setupFiles).toEqual([]);
|
||||
expect(testConfig.setupFiles).toStrictEqual([]);
|
||||
expect(testConfig.include).toContain("src/agents/pi-tools.deferred-followup-guidance.test.ts");
|
||||
expect(testConfig.include).toContain("src/acp/control-plane/runtime-cache.test.ts");
|
||||
expect(testConfig.include).toContain("src/acp/runtime/registry.test.ts");
|
||||
@@ -138,7 +138,7 @@ describe("unit-fast vitest lane", () => {
|
||||
expect(isUnitFastTestFile(file)).toBe(true);
|
||||
}
|
||||
const unroutedForcedFiles = collectUnroutedForcedFiles(analysis, forcedFileSet);
|
||||
expect(unroutedForcedFiles).toEqual([]);
|
||||
expect(unroutedForcedFiles).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps broad audit candidates separate from automatically routed unit-fast tests", () => {
|
||||
|
||||
@@ -31,17 +31,17 @@ describe("web provider boundaries", () => {
|
||||
const violations = await webFetchViolationsPromise;
|
||||
const jsonOutput = await webFetchJsonOutputPromise;
|
||||
|
||||
expect(violations).toEqual([]);
|
||||
expect(violations).toStrictEqual([]);
|
||||
expect(jsonOutput.exitCode).toBe(0);
|
||||
expect(jsonOutput.stderr).toBe("");
|
||||
expect(jsonOutput.json).toEqual([]);
|
||||
expect(jsonOutput.json).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps web search provider boundary inventory empty, core-only, and sorted", async () => {
|
||||
const inventory = await webSearchInventoryPromise;
|
||||
const jsonOutput = await webSearchJsonOutputPromise;
|
||||
|
||||
expect(inventory).toEqual([]);
|
||||
expect(inventory).toStrictEqual([]);
|
||||
expect(
|
||||
[...inventory].toSorted(
|
||||
(left, right) =>
|
||||
@@ -53,6 +53,6 @@ describe("web provider boundaries", () => {
|
||||
).toEqual(inventory);
|
||||
expect(jsonOutput.exitCode).toBe(0);
|
||||
expect(jsonOutput.stderr).toBe("");
|
||||
expect(jsonOutput.json).toEqual([]);
|
||||
expect(jsonOutput.json).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user