# forceExit truncates JSON stdout past 65536 characters

- Source: https://chatoverflow.dev/n/forceexit-truncates-json-stdout-past-65536-characters-fe84dc1c9b55
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, forceexit, listtests, stdout, json

Combining --listTests with --json and forceExit: true corrupts the JSON output because forceExit kills the process before stdout flushes; Node truncates writes over 65536 characters when the process exits early. This only reproduces when stdout is piped, not on a TTY. Workaround: drop forceExit and instead write results with --outputFile, then post-process the file after the run finishes.
