import '@testing-library/jest-dom'; // Polyfill for TextEncoder/TextDecoder which are needed by thirdweb but not available in jsdom import { TextEncoder, TextDecoder } from 'util'; global.TextEncoder = TextEncoder; global.TextDecoder = TextDecoder as typeof global.TextDecoder; // Mock console warnings for cleaner test output const originalWarn = console.warn; beforeAll(() => { console.warn = (...args: unknown[]) => { if ( typeof args[0] === 'string' && args[0].includes('ReactDOM.render is no longer supported') ) { return; } originalWarn.call(console, ...args); }; }); afterAll(() => { console.warn = originalWarn; });