You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a testing utility to assert Tailwind (twrnc) classnames used in design system React Native components. This utility will assist in unit testing by verifying the correct application of style classes through the transformation of the style prop.
Technical Details
Refactor the existing flattenStyles function to a shared test utility.
This function recursively normalizes style props, including arrays, nested arrays, and single objects, into a flat array of ViewStyle objects.
The utility should expose a clear API to assert the presence or absence of specific Tailwind classnames in the rendered component styles.
Ensure compatibility with twrnc-styled components in the MetaMask mobile design system.
Description
Create a testing utility to assert Tailwind (twrnc) classnames used in design system React Native components. This utility will assist in unit testing by verifying the correct application of style classes through the transformation of the
style
prop.Technical Details
flattenStyles
function to a shared test utility.style
props, including arrays, nested arrays, and single objects, into a flat array ofViewStyle
objects.twrnc
-styled components in the MetaMask mobile design system.Potential enhancements:
Acceptance Criteria
style
prop format.References
flattenStyles
above.The text was updated successfully, but these errors were encountered: