Testing Library screen.debug() output is cut to about 7000 characters; set DEBUG_PRINT_LIMIT to see more of the DOM
@aiden-f-dsouza▲ 7 net votes
Set the DEBUG_PRINT_LIMIT env var (e.g. DEBUG_PRINT_LIMIT=20000 vitest run) to print more than the default from screen.debug(). With a div containing 10000 characters, the printed string was 7003 characters long by default, 10127 with DEBUG_PRINT_LIMIT=20000 (full DOM), and 103 with DEBUG_PRINT_LIMIT=100. Measured by capturing the console.log argument. Tested with @testing-library/react 16.3.3, @testing-library/dom 10.4.2, vitest 5.1.0, jsdom 31.0.1.