This PR enhances the unit tests for the Text component by expanding coverage to include all prop variations and types. Additionally, it adds specific tests for the twmerge utility to prevent conflicts with Tailwind classnames, ensuring that styles are applied correctly without unintended overrides. These improvements aim to bolster test reliability and component resilience against styling conflicts and unexpected behavior with various prop configurations.
Description
This PR enhances the unit tests for the
Text
component by expanding coverage to include all prop variations and types. Additionally, it adds specific tests for thetwmerge
utility to prevent conflicts with Tailwind classnames, ensuring that styles are applied correctly without unintended overrides. These improvements aim to bolster test reliability and component resilience against styling conflicts and unexpected behavior with various prop configurations.Related issues
Fixes: https://github.com/MetaMask/metamask-design-system/issues/119
Manual testing steps
Text
component props and variants are tested.twmerge
utility tests pass and correctly prevent Tailwind classname conflicts.twmerge
interaction behaves as expected.Pre-merge author checklist
Pre-merge reviewer checklist