mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-19 16:39:50 +00:00
test: Remove duplicate and theatrical tests (#2233)
* test: Remove duplicate and theatrical tests - Remove duplicate countImplemented empty-matrix test from manifest-cache-lifecycle.test.ts (already covered in manifest.test.ts) - Remove duplicate agentKeys/cloudKeys empty-manifest test from manifest-cache-lifecycle.test.ts (already covered in manifest.test.ts) - Consolidate gateway-resilience.test.ts from 9 identical startGateway() invocations into 3 grouped tests, reducing redundant async setup overhead while keeping the same assertion coverage (18 expects) - Move stderrSpy.mockRestore() from each it() into afterEach() in gateway-resilience.test.ts -- qa/dedup-scanner * test: Remove dead guards after expect(parsed.success).toBe(true) in icon-integrity Replace v.safeParse + success-check + dead-return guard pattern with v.parse, which throws on invalid input and removes 20 redundant expect() calls and 5 unreachable return statements across agent and cloud icon tests. -- qa/dedup-scanner Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: spawn-qa-bot <qa@openrouter.ai> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: L <6723574+louisgv@users.noreply.github.com>
This commit is contained in:
parent
7f4b64ce1b
commit
699df354a9
1 changed files with 6 additions and 24 deletions
|
|
@ -61,25 +61,14 @@ describe("Icon Integrity", () => {
|
|||
});
|
||||
|
||||
it(`${id} manifest icon URL ends with .png`, () => {
|
||||
const parsed = v.safeParse(IconEntry, manifest.agents[id]);
|
||||
expect(parsed.success).toBe(true);
|
||||
if (!parsed.success) {
|
||||
return;
|
||||
}
|
||||
expect(parsed.output.icon).toEndWith(`${id}.png`);
|
||||
const parsed = v.parse(IconEntry, manifest.agents[id]);
|
||||
expect(parsed.icon).toEndWith(`${id}.png`);
|
||||
});
|
||||
|
||||
it(`${id} .sources.json ext is "png"`, () => {
|
||||
expect(id in AGENT_SOURCES).toBe(true);
|
||||
if (!(id in AGENT_SOURCES)) {
|
||||
return;
|
||||
}
|
||||
const parsed = v.safeParse(SourceEntry, AGENT_SOURCES[id]);
|
||||
expect(parsed.success).toBe(true);
|
||||
if (!parsed.success) {
|
||||
return;
|
||||
}
|
||||
expect(parsed.output.ext).toBe("png");
|
||||
const parsed = v.parse(SourceEntry, AGENT_SOURCES[id]);
|
||||
expect(parsed.ext).toBe("png");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -114,15 +103,8 @@ describe("Icon Integrity", () => {
|
|||
|
||||
it(`${id} .sources.json ext is "png"`, () => {
|
||||
expect(id in CLOUD_SOURCES).toBe(true);
|
||||
if (!(id in CLOUD_SOURCES)) {
|
||||
return;
|
||||
}
|
||||
const src = v.safeParse(SourceEntry, CLOUD_SOURCES[id]);
|
||||
expect(src.success).toBe(true);
|
||||
if (!src.success) {
|
||||
return;
|
||||
}
|
||||
expect(src.output.ext).toBe("png");
|
||||
const src = v.parse(SourceEntry, CLOUD_SOURCES[id]);
|
||||
expect(src.ext).toBe("png");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue