test: add ProfileLink component tests (#12)#180
Conversation
ShantKhatri
left a comment
There was a problem hiding this comment.
Implementation(files under src) files are changed, while the PR is of test. While writing tests, it's recommended that src files should be touched.
Got it, thanks for pointing that out. The src file changes were made only to support the test setup, but I understand that this PR should remain test-only. |
amritbej
left a comment
There was a problem hiding this comment.
I noticed that some unrelated implementation and dependency changes were accidentally included in this PR while setting up the tests. , and keep the PR focused only on the "ProfileLink" component tests.
Signed-off-by: amritbej.sh <amritbej750@gmail.com>
|
Hi @ShantKhatri , please merge my pr if there is no issue .. 🙏 |
Summary
Adds Jest + React Testing Library coverage for the
ProfileLinkcomponent in the mobile app. This PR verifies that the component renders the correct platform/username information and correctly triggers theonPresscallback interaction.Closes #12
Type of Change
What Changed
apps/mobile/__tests__/ProfileLink.test.tsxonPresscallback executionHow to Test
Run:
pnpm --filter @devcard/mobile testVerify the
ProfileLinktest suite passes successfullyConfirm render and press interaction assertions execute correctly
Checklist
pnpm -r run lintpasses).pnpm -r run typecheck).pnpm -r run test).console.logor debug statements left in the code.Additional Context
This PR focuses only on adding automated tests for the
ProfileLinkcomponent and does not modify component behavior.