Summary
TypewriterText at packages/agent/src/streaming/TypewriterText/TypewriterText.tsx has no tests.
What to do
- Create
packages/agent/src/streaming/TypewriterText/__tests__/TypewriterText.test.tsx
- Use
vitest + @testing-library/react + vi.useFakeTimers()
- Test cases to include:
- Text renders progressively (characters appear over time)
onComplete callback fires when the animation finishes
- Cursor is hidden when
showCursor={false}
- Cursor disappears after completion
- An
axe accessibility check passes
Useful references
- Component:
packages/agent/src/streaming/TypewriterText/TypewriterText.tsx
- Test pattern to follow:
packages/core/src/inputs/TextArea/__tests__/TextArea.test.tsx
- Test tooling:
vitest, @testing-library/react, vitest-axe
Summary
TypewriterTextatpackages/agent/src/streaming/TypewriterText/TypewriterText.tsxhas no tests.What to do
packages/agent/src/streaming/TypewriterText/__tests__/TypewriterText.test.tsxvitest+@testing-library/react+vi.useFakeTimers()onCompletecallback fires when the animation finishesshowCursor={false}axeaccessibility check passesUseful references
packages/agent/src/streaming/TypewriterText/TypewriterText.tsxpackages/core/src/inputs/TextArea/__tests__/TextArea.test.tsxvitest,@testing-library/react,vitest-axe