CodeVetter · Repo Unpack · Testing signals
reduxjs/redux-toolkit
Tests and CI were inspected, not executed; no passing result or measured coverage is asserted. The inspected suites combine Vitest runtime/type checks, mocked HTTP, React Testing Library, transformation fixtures, and Playwright application checks. Coverage includes consequential failure and concurrency branches, but mock-based assertions have specific limits. This investigation is bounded and does not establish exhaustive repository coverage.
- Toolkit's test script runs vitest --typecheck --run; configuration uses jsdom, globals, source test/spec discovery, and setup that installs node-fetch globals and starts MSW with unhandled requests treated as errors.
- fetchBaseQuery tests assert JSON success, empty-body null, HTTP 500 data, connection-loss FETCH_ERROR, invalid-JSON PARSING_ERROR, and asynchronous bearer-header preparation.
- React hook tests inspect skip and skipToken transitions, including retained data with cleared currentData and removed subscriptions; createApi tests exercise argument schema validation and failure-handler payloads.
- Optimistic tests assert forward/inverse patch contents and hook updates during an in-flight refetch. Infinite-query tests assert unbounded growth, maxPages trimming in both directions, and development-time validation of maxPages/getPreviousPageParam.
- createAsyncThunk tests assert pending-to-rejected behavior after abort, preserved abort reasons, no fulfilled action at resolution of an aborted signal-unaware payload creator handle, and immediate handle resolution while underlying work remains running. The sampled assertions do not wait for that underlying work to finish.
- OpenAPI tests spawn the CLI, compare generated snapshots, check JS/TS/JSON equivalence, filtering, and missing operation IDs; GraphQL adapter tests use mocked clients, and the URL-initialization case only asserts that a function is created.
- Codemod tests use runInlineTest against input/output fixtures; the helper's 'is idempotent' case repeats the original input rather than applying the transform to transformed output, so that assertion does not demonstrate second-pass stability.
- Inspected CI configures artifact-based Toolkit runtime/type testing and detached portability checks, plus a separate OpenAPI artifact workflow. Next's Playwright fixture checks server-entrypoint rendering, counter/async interactions, and query output; these configurations and tests were not executed here.