This pull request introduces the addition of the native testID prop to the MotiPressable component. The purpose of this change is to facilitate better testing practices by allowing developers to assign a test ID to MotiPressable elements.
Changes
A testID prop has been added to the MotiPressableProps type definition.
The testID prop is now deconstructed from the props in MotiPressable.tsx and passed down to the underlying Pressable component. This allows for the testID to be utilized in testing frameworks like Jest for selecting elements.
Benefits
With the testID prop, developers can write more robust tests for components that utilize MotiPressable. This small but significant enhancement improves the testability of components, making it easier to maintain high-quality code standards.
Overview
This pull request introduces the addition of the native
testID
prop to theMotiPressable
component. The purpose of this change is to facilitate better testing practices by allowing developers to assign a test ID toMotiPressable
elements.Changes
testID
prop has been added to theMotiPressableProps
type definition.testID
prop is now deconstructed from the props inMotiPressable.tsx
and passed down to the underlyingPressable
component. This allows for thetestID
to be utilized in testing frameworks like Jest for selecting elements.Benefits
With the
testID
prop, developers can write more robust tests for components that utilizeMotiPressable
. This small but significant enhancement improves the testability of components, making it easier to maintain high-quality code standards.