# Testing signals — immerjs/immer

> Canonical page: https://codevetter.com/unpack/immer/testing-signals

# Testing signals — immerjs/immer

Scanned commit 061c2425e1c9dff89e4e4189d42af1b7839dfe0a (2026-08-19). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Tests and CI were inspected, not executed; test existence is not a passing result. The inspected suite uses Vitest in Node, repeats core behavior across configuration combinations, and has a separate production-CJS test configuration. Coverage includes structural sharing, manual lifecycles, patch replay, collection behavior, and array regressions, but inspected scripts and configurations leave specific verification limits.
- Source tests use Vitest with Node environment, global test APIs, and __tests__ JavaScript/TypeScript discovery; coverage uses V8 with text and LCOV outputs, but no execution or coverage result was obtained. — [vitest.config.ts#L1-L15](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/vitest.config.ts#L1-L15)
- __tests__/base.js repeats its core suite across auto-freeze, strict-copy, and listener booleans, with one additional array-plugin configuration rather than a full plugin/configuration cross-product. — [__tests__/base.js#L38-L52](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/base.js#L38-L52) [__tests__/base.js#L89-L97](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/base.js#L89-L97)
- Core assertions check unchanged-root identity, structural sharing, deep-change propagation, plugin no-op identity, and reorder-then-mutate preservation with patch replay/reversal. — [__tests__/base.js#L100-L126](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/base.js#L100-L126) [__tests__/base.js#L295-L320](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/base.js#L295-L320) [__tests__/base.js#L435-L463](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/base.js#L435-L463)
- Patch fixtures assert exact patches, replay, and inverse restoration; dedicated cases assert that __proto__ traversal through objects and arrays throws without polluting unrelated objects. — [__tests__/patch.js#L79-L95](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/patch.js#L79-L95) [__tests__/patch.js#L1307-L1346](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/patch.js#L1307-L1346)
- Manual-draft tests exercise argument errors, immutable results, repeated finish rejection, and patch listeners; post-finish mutation checks are conditional on non-production mode, while plugins.js tests missing-plugin errors. — [__tests__/manual.js#L20-L77](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/manual.js#L20-L77) [__tests__/plugins.js#L1-L29](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/plugins.js#L1-L29)
- Production tests alias public source imports to the production CJS build, define USES_BUILD and production NODE_ENV, and use separate snapshots; their custom reporter can reset exitCode when its failure predicate and errors array are empty. — [vitest.config.build.ts#L4-L24](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/vitest.config.build.ts#L4-L24) [vitest.config.build.ts#L37-L48](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/vitest.config.build.ts#L37-L48) [vitest-custom-reporter.ts#L3-L16](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/vitest-custom-reporter.ts#L3-L16)
- TypeScript fixtures use compile-time assert signatures whose runtime body is an identity function; inspected Yarn/Vitest configuration does not explicitly enable checking those fixtures with tsc, while two reconciliation identity tests are explicitly skipped. — [__tests__/produce.ts#L53-L65](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/produce.ts#L53-L65) [__tests__/spec_ts.ts#L42-L53](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/spec_ts.ts#L42-L53) [package.json#L28-L35](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/package.json#L28-L35) [__tests__/regressions.js#L200-L227](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/__tests__/regressions.js#L200-L227)
- Inspected CI runs Node 24 with frozen-lockfile install, yarn test, coverage, performance workloads, and Coveralls; this is one configured Node version, and the separate Mitata package is not invoked by those listed test steps. — [.github/workflows/test.yml#L13-L31](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/.github/workflows/test.yml#L13-L31) [package.json#L29-L35](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/package.json#L29-L35) [perf-testing/package.json#L6-L14](https://github.com/immerjs/immer/blob/061c2425e1c9dff89e4e4189d42af1b7839dfe0a/perf-testing/package.json#L6-L14)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
