Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add testID prop to MotiPressable for improved testability #328

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Add testID prop to MotiPressable for improved testability #328

merged 1 commit into from
Jan 9, 2024

Conversation

agrawal-rohit
Copy link
Contributor

Overview

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.

Copy link

vercel bot commented Dec 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
moti ❌ Failed (Inspect) Dec 16, 2023 10:53pm

@agrawal-rohit
Copy link
Contributor Author

@nandorojo bump

@nandorojo nandorojo merged commit de89463 into nandorojo:master Jan 9, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants