spawn/packages
A f0cadc2758
test: Remove duplicate and theatrical tests (#2009)
* test: Remove duplicate and theatrical tests

Found and removed three categories of test anti-patterns:

1. **Conditional always-pass guard** (`with-retry-result.test.ts`): The
   `if (!result.ok)` wrapper around `expect(result.error).toBeInstanceOf(Error)`
   was silently skippable if the condition ever evaluates false. Replaced with a
   type-narrowing early return (`if (result.ok) { return; }`) so the assertions
   always execute when the code path is reached.

2. **Duplicate `loadManifest` tests** (`manifest.test.ts`): Five tests covering
   stale-cache fallback, no-cache-network-fail, invalid-fetch-fallback, fetch
   timeout, and cached-instance reuse were exact duplicates of tests already
   in `manifest-cache-lifecycle.test.ts` (which covers these scenarios more
   thoroughly). Removed the duplicates; kept the three tests unique to
   `manifest.test.ts` (fetch URL validation, fresh-cache skips network,
   forceRefresh behavior).

3. **Duplicate manifest structural checks** (`manifest-type-contracts.test.ts`):
   The "Cross-referential consistency" (matrix coverage, no-invalid-refs, valid
   status values) and "Display name uniqueness" (unique agent/cloud names, no
   key collisions) describe blocks duplicated tests already present in
   `manifest-integrity.test.ts`. Removed the 6 redundant tests; the unique type
   validation tests (per-field `typeof` checks) remain.

Net result: -11 tests, 0 new failures, lint clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: biome format issues in test files

Remove trailing blank line in manifest.test.ts and expand single-line
if block in with-retry-result.test.ts to satisfy biome formatter.

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.5 <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: B <6723574+louisgv@users.noreply.github.com>
2026-02-28 00:08:57 -08:00
..
cli test: Remove duplicate and theatrical tests (#2009) 2026-02-28 00:08:57 -08:00
shared feat!: remove Fly.io cloud provider support (#1979) 2026-02-27 00:06:32 -05:00