Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.43 KB

File metadata and controls

37 lines (26 loc) · 1.43 KB

CONTRIBUTOR-DOCS / Style guide / Testing guide

Testing guide

Beneath this doc

This guide explains how to write tests for 2nd-gen components. Good tests catch bugs before users see them, make sure components are accessible, document how components should work, and give you confidence when changing code.

We use three types of tests:

Type Tool File pattern What it covers
Interaction tests Storybook play functions *.test.ts Properties, slots, events, warnings
Accessibility tests Playwright + aXe *.a11y.spec.ts ARIA tree, WCAG compliance
Visual regression tests Storybook + Chromatic *.stories.ts Rendering across browsers and themes