Storybook 8.3 brings experimental story testing with Vtest

0
20
Storybook 8.3 brings experimental story testing with Vtest


Storybook 8.3 has been released. The open source tool for developing and testing UI components enables the use of the Vite unit testing framework – with the help of an add-on that is currently considered experimental. In this context, an experimental connection to Vite is also available.

Advertisement


In addition, Storybook can boast of a reduced bundle size: the installation size decreased by approximately 20 percent since the previous version 8.2 – thanks to the consolidation of 18 packages into a single Storybook core package – and now in version 8.3 the size has been reduced by even more than 30 percent.

As the Storybook team explains in a blog post about the new release, a story is a JavaScript code snippet that contains an example of a UI component. Storybook provides a searchable list of stories that includes all the major states of the user interface. However, in addition to this, Storybook serves as an executable test suite, which is where the connection to Vtest comes in handy: thanks to a new experimental add-on (@storybook/experimental-addon-test), all stories can be run as tests in a headless browser with Vite. The add-on is the result of a collaboration with Vite’s core team and should be usable with minimal configuration. Vite is a unit testing framework based on the Vite build tool that is characterized by its high speed.

According to the Storybook team, the advantages of the Viteste add-on include, in addition to higher testing speed, test metrics available out of the box, the developer experience of the Viteste CLI, and compatibility with the Viteste extension for Visual Studio Code.

When it comes to Vtest integration support for projects with the bundler Webpack, there is no generally applicable process. However, for projects using the React framework Next.js, the Storybook team has An experimental connection to Vite advanced (@storybook/experimental-nextjs-vite).This makes it possible to simulate the Next.js environment and use its features such as customized graphics and fonts.



Versatiles: Open source project as an alternative to commercial mapping servicesVersatiles: Open source project as an alternative to commercial mapping services

EnterJS React 19 Day, Online Conference, October 17, 2024

(Image: Jacky Niam/Shutterstock.com)

The online conference will be presented on October 17, 2024 Feedback 19 days New features of the popular JavaScript library from dpunkt.verlag and iX. Theme day as part of EnterJS Shows participants how they can make the most of the new version and how modern web development with React 19 improves their applications. Excerpt from the event:

early bird tickets Available till 25th September.

Overall, Storybook 8.3 offers hundreds of new features and bug fixes. The above and some other highlights include Blog entry for the release,


(May)

“Worrying”: Artificial intelligence is becoming increasingly less reliable, according to an international study“Worrying”: Artificial intelligence is becoming increasingly less reliable, according to an international study

LEAVE A REPLY

Please enter your comment!
Please enter your name here