Storybook Releases Storybook v9 With Improved Testing Support
Briefly

Storybook version 9 brings enhanced functionality, particularly in testing, through integration with Vitest. This version features a new 'Storybook Test' that allows developers to run tests for all stories simultaneously from a test widget. Testing encompasses three categories: Interaction, Accessibility, and Visual tests. Additionally, accessibility testing leverages the axe-core tooling to identify WCAG violations effectively. The new widget serves as a centralized place for monitoring the results of various tests and improves the efficiency of the development process by automating tests on file saves, enhancing the developer experience overall.
Storybook version 9 introduces significant testing improvements with Vitest collaboration, a new test widget for running all stories at once, and enhanced performance with a flatter dependency structure.
The Storybook Test feature allows launching tests for all stories from a test widget, and includes a watch mode for automatic tests upon file saves, focusing on Interaction, Accessibility, and Visual tests.
Accessibility tests integrated with the Storybook accessibility addon utilize axe-core tooling to detect violations against WCAG standards, providing immediate feedback right within the accessibility tab of Storybook.
Visual tests are now powered by Chromatic, enabling snapshot testing for components. The new widget provides a comprehensive overview of tests and simplifies the testing process.
Read at InfoQ
[
|
]