MetaMask / metamask-design-system

2 stars 1 forks source link

chore: improving Text unit and utils tests #122

Closed georgewrmarshall closed 15 hours ago

georgewrmarshall commented 6 days ago

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 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.

Related issues

Fixes: https://github.com/MetaMask/metamask-design-system/issues/119

Manual testing steps

  1. Run the unit tests suite to verify that all Text component props and variants are tested.
  2. Confirm that the twmerge utility tests pass and correctly prevent Tailwind classname conflicts.
  3. Review test output to ensure each prop and twmerge interaction behaves as expected.

Pre-merge author checklist

Pre-merge reviewer checklist