Skip to content

Regression in 0.0.10: switching to Node AbortController/AbortSignal breaks Jest tests with AggregateError #37

@daveobrien-optaxe

Description

@daveobrien-optaxe

Upgrading jest-fixed-jsdom from 0.0.9 to 0.0.10 causes widespread test failures (AggregateError during render/act) on our repo. Rolling back to 0.0.9 fixes all failures. The only change in 0.0.10 appears to be using Node’s global AbortController/AbortSignal, which likely changes abort/error semantics in the test environment.

Reference: compare v0.0.9…v0.0.10

Environment

  • Node: 22.11.0
  • Jest: 29.7.0
  • testEnvironment: jest-fixed-jsdom
  • @testing-library/react: 16.0.0

Reproduction

  1. Set testEnvironment: jest-fixed-jsdom in jest.config.ts.
  2. Install jest-fixed-jsdom@0.0.10.
  3. Run tests that render React components which internally use fetch/Relay or abortable operations.
  4. Observe failures - Example failure snippet (one of many):
AggregateError:

  at aggregateErrors (node_modules/react/cjs/react.development.js:527:11)
  at act (node_modules/react/cjs/react.development.js:873:24)
  at render (node_modules/@testing-library/react/dist/pure.js:292:10)

Notes

  • I’m not certain whether the root cause is specifically React 19’s act handling or error propagation from the environment; I only observe the regression coinciding with the Node AbortController/AbortSignal switch in 0.0.10.
  • There’s an open issue that may be related to global overrides breaking tests: see “Always overriding global value breaks some tests” 1.

Ask

  • Could you confirm whether the Node AbortController/AbortSignal swap is intended to be unconditional?
  • If so, is there a recommended way to opt-out or align error/abort semantics with JSDOM’s DOM-style APIs to avoid these regressions?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions