Skip to content

docs(components): scaffold test files in the new component workflow - #225

Merged
Chibuzor-Nwemambu merged 1 commit into
mainfrom
214-new-component-workflow
Jul 9, 2026
Merged

docs(components): scaffold test files in the new component workflow#225
Chibuzor-Nwemambu merged 1 commit into
mainfrom
214-new-component-workflow

Conversation

@Chibuzor-Nwemambu

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a test-file step to packages/components/CLAUDE.md's "When Adding New Components" workflow, alongside the main component/types/styles files.
  • Adds a corresponding line item to the Component Development Checklist.
  • No automated scaffolding script exists in this repo — the workflow is documentation-driven, so this doc update is the fix.

Closes #214

Test plan

  • Doc-only change, no code affected
  • Verified the test-utils description against test-utils.tsx
  • Verified Divider.test.tsx as the referenced example is accurate and current

Add a test-file step to "When Adding New Components" and the
Component Development Checklist, so new components ship with a
ComponentName.test.tsx from day one instead of as a follow-up.

Closes #214
@Chibuzor-Nwemambu Chibuzor-Nwemambu linked an issue Jul 8, 2026 that may be closed by this pull request
5 tasks
@Chibuzor-Nwemambu

Copy link
Copy Markdown
Collaborator Author

@claude review

@claude

claude Bot commented Jul 8, 2026

Copy link
Copy Markdown

Claude finished @Chibuzor-Nwemambu's task in 58s —— View job


Review: scaffold test files in the new component workflow

  • Read the diff and surrounding doc context
  • Verify referenced files (test-utils, Divider.test.tsx) exist and are described accurately
  • Check consistency with the rest of the workflow section
  • Post review feedback

Verdict: LGTM. This is a well-scoped, accurate doc-only change. Every claim checks out against the code.

What I verified

Claim in the doc Reality
test-utils exists packages/components/test-utils.tsx
It "wraps @testing-library/react-native with EDSProvider" Re-exports all of RNTL and overrides render to wrap UI in <EDSProvider colorScheme="light" density="comfortable">
Divider.test.tsx is a good minimal example Renders via test-utils, asserts render (getByTestId) + a11y (accessible/importantForAccessibility)
Naming YourComponent.test.tsx matches convention Consistent with all 10 existing *.test.tsx files

The addition also aligns nicely with recent work — commit b2fa65c (#218) and the preceding test additions show the repo is actively standardizing on this pattern, so encoding it into the workflow is timely.

Minor, non-blocking notes

  1. Density precisiontest-utils hard-codes colorScheme="light" and density="comfortable". The checklist elsewhere asks that components "support both comfortable and spacious density modes" and "both light and dark modes." A reader following this guidance gets a single light/comfortable render by default. Not a problem for the doc (it says "minimal shape"), but if you want the guidance to nudge toward fuller coverage, you could add a half-sentence like "…override the wrapper props to also exercise dark / spacious where behavior differs." Purely optional.

  2. Bullet density — the new bullet is noticeably longer and denser than its terse siblings (Main component file: …, Types file: …). It reads fine, but if you prefer visual parity you could trim the parenthetical since test-utils is one file away for anyone who looks. Style-only.

Neither note blocks merge — the change is correct as written.
· 214-new-component-workflow

@pomfrida pomfrida left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Chibuzor-Nwemambu
Chibuzor-Nwemambu merged commit 6e1ad2d into main Jul 9, 2026
7 checks passed
@Chibuzor-Nwemambu
Chibuzor-Nwemambu deleted the 214-new-component-workflow branch July 9, 2026 09:22
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.

test: add component test infrastructure

2 participants