78fe3f68cc
Prevents OOM crashes when running the full Jest suite — the act() warning stack traces were generating 16k+ lines of output which exhausted Node heap. All assertions still run; only the noisy console.error spam is silenced. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
509 B
JavaScript
14 lines
509 B
JavaScript
import '@testing-library/jest-dom';
|
|
|
|
// Suppress noisy act() warnings from async state updates in useEffect hooks.
|
|
// All assertions still run — this only silences the console.error spam that
|
|
// causes OOM crashes when running the full suite.
|
|
const originalError = console.error;
|
|
beforeAll(() => {
|
|
console.error = (...args) => {
|
|
if (typeof args[0] === 'string' && args[0].includes('not wrapped in act')) return;
|
|
originalError(...args);
|
|
};
|
|
});
|
|
afterAll(() => { console.error = originalError; });
|