6.1 Update jest.config.js
ThetransformIgnorePatterns must include @amazon-devices/react-native-kepler. The package 4.0.0 uses ES module syntax in its jest/setup.js file. Without this pattern, Jest fails with SyntaxError: Cannot use import statement outside a module.
6.2 Create jest.setup.js for TV mocks
RN 0.83 changes how mocks work in the test environment. Create a setup file with TV-appropriate mocks, such as the example below.6.3 Fix Jest mocks for .default exports
RN 0.83 changes many internal modules to useexport default. Existing Jest mocks that return plain objects without a .default property break silently, where components receive undefined at runtime.
Symptom Cannot read properties of undefined (reading 'create') across multiple test suites.
Affected modules
react-native/Libraries/StyleSheet/StyleSheetreact-native/Libraries/StyleSheet/flattenStylereact-native/Libraries/EventEmitter/NativeEventEmitterreact-native/Libraries/Utilities/Platformreact-native/Libraries/Utilities/Dimensionsreact-native/Libraries/Utilities/PixelRatioreact-native/Libraries/Utilities/useWindowDimensionsreact-native/Libraries/BatchedBridge/NativeModules
6.4 Update test files with act() wrapping
React 19 requires state updates in tests to be wrapped inact(), such as the example below.
@testing-library/react-native
If you use @testing-library/react-native, the testing library handles act() internally. Don’t wrap render() in ReactTestRenderer.act() because this causes “Can’t access .root on unmounted test renderer” errors.
6.5 Fix navigation stack timer leaks
If you usereact-navigation__stack, its Card.tsx file uses animation setTimeout callbacks that fire after Jest tears down the test environment.
Symptom You are trying to import a file after the Jest environment has been torn down
Fix: add to affected test files
6.6 Fix isolatedModules type export errors
If TypeScript reportsTS1205: Re-exporting a type when 'isolatedModules' is enabled requires using 'export type', update your export type like the example below.
6.7 Update snapshots
After all test fixes, regenerate snapshots.- Component wrapper structure changes
- Attribute ordering differences
- Text node rendering modifications
- Async boundary updates
git diff to review snapshot changes before committing.
