// React-specific polyfill layer. The base webcrypto polyfill is loaded via // `@suaveplan/testing/polyfills` (see vitest.config.ts setupFiles). This // file adds the React 18+ `IS_REACT_ACT_ENVIRONMENT` global expected by // React DOM when assertions are made outside an `act(...)` wrapper, plus // any future DOM-only polyfills that should not leak into the universal // `@suaveplan/testing/polyfills` entry. interface ReactActEnvWindow { IS_REACT_ACT_ENVIRONMENT?: boolean; } const win = globalThis as unknown as ReactActEnvWindow; if (win.IS_REACT_ACT_ENVIRONMENT === undefined) { win.IS_REACT_ACT_ENVIRONMENT = true; }