Awesome Reviewers

For tests, prefer deterministic, intention-revealing assertions and keep runtime tests and type-only tests strictly separated.

Apply: 1) Use the right matcher for the claim

2) Make timer-based tests fast and stable

3) Don’t mix runtime and type-only tests

4) Ensure the test can prove which code path executed

Example (async rejection + timers + type-only):

// runtime test
await expect(promise).rejects.toBe(testError)

// timer test (prefer fake timers)
vi.useFakeTimers()
vi.runAllTimersAsync()
expect(spy).toHaveBeenCalledTimes(0)

// type-only test in *.test-d.tsx
expectTypeOf(result4[0]).toEqualTypeOf<UseQueryResult<string, Error>>()

This reduces brittle/flaky tests, improves signal-to-noise, and guarantees type coverage lives where it’s actually executed by the tooling.