mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
test: avoid extension filter allocation assertions
This commit is contained in:
@@ -50,7 +50,7 @@ describe("discord wildcard component registration ids", () => {
|
||||
const components = createWildcardComponents();
|
||||
const customIds = components.map((component) => component.customId);
|
||||
|
||||
expect(customIds.filter((id) => id === "*")).toEqual([]);
|
||||
expect(customIds.some((id) => id === "*")).toBe(false);
|
||||
expect(new Set(customIds).size).toBe(customIds.length);
|
||||
});
|
||||
|
||||
|
||||
@@ -59,6 +59,6 @@ describe("buildPageContradictionClusters", () => {
|
||||
|
||||
expect(clusters).toHaveLength(2);
|
||||
expect(clusters.map((cluster) => cluster.key).toSorted()).toEqual(["किताब", "कीताब"]);
|
||||
expect(clusters.filter((cluster) => !cluster.entries)).toEqual([]);
|
||||
expect(clusters.every((cluster) => cluster.entries)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -47,7 +47,7 @@ describe("lintMemoryWikiVault", () => {
|
||||
|
||||
const result = await lintMemoryWikiVault(config);
|
||||
|
||||
expect(result.issues.filter((issue) => issue.code === "broken-wikilink")).toEqual([]);
|
||||
expect(result.issues.some((issue) => issue.code === "broken-wikilink")).toBe(false);
|
||||
});
|
||||
|
||||
it("detects duplicate ids, provenance gaps, contradictions, and open questions", async () => {
|
||||
|
||||
@@ -359,7 +359,7 @@ describe("microsoft-foundry plugin", () => {
|
||||
prepareRuntimeAuth(runtimeContext),
|
||||
prepareRuntimeAuth(runtimeContext),
|
||||
]);
|
||||
expect(failed.filter((result) => result.status !== "rejected")).toEqual([]);
|
||||
expect(failed.every((result) => result.status === "rejected")).toBe(true);
|
||||
expect(execFileMock).toHaveBeenCalledTimes(1);
|
||||
|
||||
const [first, second] = await Promise.all([
|
||||
|
||||
@@ -429,7 +429,7 @@ describe("ollama setup", () => {
|
||||
"gpt-oss:120b-cloud",
|
||||
]);
|
||||
const requestUrls = fetchMock.mock.calls.map((call) => requestUrl(call[0]));
|
||||
expect(requestUrls.filter((url) => url.endsWith("/api/show"))).toEqual([]);
|
||||
expect(requestUrls.some((url) => url.endsWith("/api/show"))).toBe(false);
|
||||
expect(requestUrls).toContain("https://ollama.com/api/tags");
|
||||
});
|
||||
|
||||
@@ -697,7 +697,7 @@ describe("ollama setup", () => {
|
||||
|
||||
expect(fetchMock).toHaveBeenCalledTimes(2);
|
||||
const requestUrls = fetchMock.mock.calls.map((call) => requestUrl(call[0]));
|
||||
expect(requestUrls.filter((url) => url.endsWith("/api/pull"))).toEqual([]);
|
||||
expect(requestUrls.some((url) => url.endsWith("/api/pull"))).toBe(false);
|
||||
expect(result.models?.providers?.ollama?.models?.map((model) => model.id)).toEqual([
|
||||
"gemma4:latest",
|
||||
]);
|
||||
|
||||
@@ -290,7 +290,7 @@ describe("handleSlackAction", () => {
|
||||
text: expect.stringContaining("/tmp/openclaw-media/report.pdf"),
|
||||
}),
|
||||
);
|
||||
expect(result.content.filter((entry) => entry.type === "image")).toEqual([]);
|
||||
expect(result.content.some((entry) => entry.type === "image")).toBe(false);
|
||||
expect(result.details).toEqual(
|
||||
expect.objectContaining({
|
||||
ok: true,
|
||||
|
||||
@@ -93,7 +93,7 @@ describe("Slack directory contract", () => {
|
||||
limit: 2,
|
||||
});
|
||||
expect(peers).toHaveLength(2);
|
||||
expect(peers.filter((entry) => !entry.id.startsWith("user:u"))).toEqual([]);
|
||||
expect(peers.every((entry) => entry.id.startsWith("user:u"))).toBe(true);
|
||||
});
|
||||
|
||||
it("resolves current Slack account identity from live auth", async () => {
|
||||
|
||||
Reference in New Issue
Block a user