mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-12 13:38:32 +00:00
The Icon component destructured `testID` out of its props and re-emitted it as `data-testid`, which is a web attribute. react-native-svg only forwards `testID` to the native view (see extractProps) and drops `data-testid`, so `<Icon testID="my-icon" />` rendered an element that no React Native test query or UI automation tool can find. `LucideProps` extends `SvgProps`, so the prop type checks and the failure is silent. v0 spread `testID` straight onto `Svg`, so this is a regression for React Native consumers. An explicitly passed `data-testid` still reaches the element through the remaining props, so nothing is lost for react-native-web users. The react-native-svg test mock now maps `testID` onto `data-testid`, so the DOM based test suite identifies elements the way React Native does. Every existing `testID` test fails against the previous behaviour.