# Testing signals — mobxjs/mobx

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

# Testing signals — mobxjs/mobx

Scanned commit 60be47cab0926d12f22449ec6c809fb5ec6601c4 (2026-09-30). 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; no passing result or coverage percentage is asserted. The bounded inspection found Jest/ts-jest suites, React Testing Library integration tests, ESLint RuleTester fixtures, and codemod subprocess tests. Assertions cover important semantics and resource lifecycles, but configured CI steps have limits that require distinguishing script names from effective checks.
- The inspected test configuration uses Jest projects, ts-jest transformation, jsdom, and a development global; coverage collection targets package TypeScript source, without supplying an execution result. — [jest.config.js#L1-L5](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/jest.config.js#L1-L5) [jest.base.config.js#L11-L32](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/jest.base.config.js#L11-L32)
- Core fixtures assert that two writes inside an action produce only the final autorun value, and that AbortSignal disposal prevents subsequent reaction effects, including initial effects for pre-aborted signals. — [packages/mobx/__tests__/base/action.js#L4-L20](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx/__tests__/base/action.js#L4-L20) [packages/mobx/__tests__/base/reaction.js#L264-L303](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx/__tests__/base/reaction.js#L264-L303)
- Flow tests assert FlowCancellationError rejection and execution of generator finally blocks; toJS tests assert identity preservation across cyclic objects, arrays, and Maps. — [packages/mobx/__tests__/base/flow.js#L182-L190](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx/__tests__/base/flow.js#L182-L190) [packages/mobx/__tests__/base/flow.js#L227-L251](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx/__tests__/base/flow.js#L227-L251) [packages/mobx/__tests__/base/tojs.js#L243-L267](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx/__tests__/base/tojs.js#L243-L267)
- React Suspense fixtures use Testing Library, fake timers, and observer-tree assertions to test abandoned renders, repeated retries, recovery before subscription, and preservation of committed observers during suspended transitions. — [packages/mobx-react-lite/__tests__/suspenseCleanup.test.tsx#L1-L26](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx-react-lite/__tests__/suspenseCleanup.test.tsx#L1-L26) [packages/mobx-react-lite/__tests__/suspenseCleanup.test.tsx#L29-L84](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx-react-lite/__tests__/suspenseCleanup.test.tsx#L29-L84) [packages/mobx-react-lite/__tests__/suspenseCleanup.test.tsx#L107-L127](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx-react-lite/__tests__/suspenseCleanup.test.tsx#L107-L127) [packages/mobx-react-lite/__tests__/suspenseCleanup.test.tsx#L130-L168](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx-react-lite/__tests__/suspenseCleanup.test.tsx#L130-L168)
- Retention coverage uses forced GC and WeakRef to check collection of the first rendered element tree; it deliberately excludes first-props collection because plain React.memo fails that control assertion. Registry fixtures separately check native/timer cancellation and synchronous registration avoidance. — [packages/mobx-react-lite/__tests__/useObserverRetention.test.tsx#L19-L50](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx-react-lite/__tests__/useObserverRetention.test.tsx#L19-L50) [packages/mobx-react-lite/__tests__/UniversalFinalizationRegistry.test.ts#L31-L94](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx-react-lite/__tests__/UniversalFinalizationRegistry.test.ts#L31-L94)
- The ESLint plugin runs separate ESLint 7 and 9 Jest projects; missing-observer RuleTester fixtures check valid syntax, diagnostics, and exact autofix output. These inspected projects do not establish behavior across every version allowed by its peer range. — [packages/eslint-plugin-mobx/jest.config-eslint-7.js#L3-L9](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/eslint-plugin-mobx/jest.config-eslint-7.js#L3-L9) [packages/eslint-plugin-mobx/jest.config-eslint-9.js#L3-L9](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/eslint-plugin-mobx/jest.config-eslint-9.js#L3-L9) [packages/eslint-plugin-mobx/__tests__/missing-observer.js#L47-L54](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/eslint-plugin-mobx/__tests__/missing-observer.js#L47-L54) [packages/eslint-plugin-mobx/package.json#L28-L29](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/eslint-plugin-mobx/package.json#L28-L29)
- Codemod tests compare applyTransform output with inline snapshots; CLI fixtures write source files and execute subprocesses to check paths containing spaces and mixed TS/TSX parsing, so running these tests would perform filesystem mutations. — [packages/mobx-undecorate/__tests__/undecorate.spec.ts#L1-L40](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx-undecorate/__tests__/undecorate.spec.ts#L1-L40) [packages/mobx-undecorate/__tests__/cli.spec.tsx#L6-L28](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx-undecorate/__tests__/cli.spec.tsx#L6-L28) [packages/mobx-undecorate/__tests__/cli.spec.tsx#L60-L94](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx-undecorate/__tests__/cli.spec.tsx#L60-L94)
- Build/test CI configures Node 24, npm ci --ignore-scripts, lint, build:check, build:test, serial Jest, size reporting, and performance scripts. Coveralls execution/upload are commented out; core Jest discovery selects base tests, and check-size prints measurements without a budget comparison in its inspected run function. — [.github/workflows/build_and_test.yml#L18-L42](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/.github/workflows/build_and_test.yml#L18-L42) [.github/workflows/coveralls.yml#L24-L33](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/.github/workflows/coveralls.yml#L24-L33) [packages/mobx/jest.config.js#L3-L5](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/packages/mobx/jest.config.js#L3-L5) [scripts/size/index.js#L148-L174](https://github.com/mobxjs/mobx/blob/60be47cab0926d12f22449ec6c809fb5ec6601c4/scripts/size/index.js#L148-L174)

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)
