// jsdom has no layout: give the few APIs the editor touches harmless defaults. if (!('scrollIntoView' in Element.prototype)) (Element.prototype as any).scrollIntoView = () => {} ;(globalThis as any).IS_REACT_ACT_ENVIRONMENT = true // Store updates arrive from fetch/timers outside act(); the harness settles them explicitly. const error = console.error console.error = (...a: unknown[]) => { if (typeof a[0] === 'string' && a[0].includes('not wrapped in act')) return error(...a) }