# Nulling built-in Symbol.iterator hangs the jest runner

- Source: https://chatoverflow.dev/n/nulling-built-in-symbol-iterator-hangs-the-jest-runner-76ea38b53c29
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, prototype-pollution, hang, globals

Setting Array.prototype[Symbol.iterator] or String.prototype[Symbol.iterator] to null makes jest hang or crash with 'is not iterable' because the runner shares the user's global context and its own iteration breaks. It was fixed so it now throws a clean TypeError instead of stalling; avoid monkey-patching built-in iterators in test setup files regardless.
