Industry standard frontend workshop. Develop, test, and document components with ease. Open-source & maintained by @chromaticcom

npx storybook@latest init
Finally, because these tests are stories, you can preview and interact with them in Storybook. And if you’re using the experimental Storybook Test, you can even run these tests from the Storybook UI:
1
1
771
We can use these techniques together to fully test the RSC’s behavior and functionality. We authenticate by setting the cookie, and any database actions use the mocked module. We simulate user interaction with the excellent @TestingLib’s API and make assertions with @Vitest_dev.
1
1
149
We can also use the in-memory database to mock application states. Such as here, where the first story has two mocked notes and the second story has none.
1
1
126
This mocking strategy means dealing with authentication is a snap. Here, we just set the auth cookie and we’re done:
1
2
133
So how does it work? With Node’s subpath imports, you can load the real backend module in your app and a browser-capable (typesafe!) mocked implementation in your stories (tests). These tests are isolated from others, making parallelization—tricky in an E2E environment—trivial.
1
3
184
Remember, Component Tests: - Render a component in the browser for high fidelity - Simulate a user interacting with UI, like an E2E test - Only test a single UI component and can reach into the implementation to mock or manipulate deps, like a unit test
1
7
207
RSCs run in both frontend & backend environments, which makes them fast to render, but traditional testing difficult-to-impossible. Until now, the industry has largely resorted to E2E testing for RSCs. But they’re just components, so we made it possible to Component Test them.
1
2
212
🙅 Firing up your whole E2E setup just to test React Server Components (RSCs) 🙌 Component testing RSCs in the browser, with mocked complex app states and reliable speed 🧵
2
16
79
5,136
Storybook retweeted
next-forge now comes with @storybookjs and all the @shadcn/ui component stories. docs.next-forge.com/storyboo…
7
86
4,249
Join us for Storybook Paris on Dec 12! Talks from France Télévisions and Orange Telecom. - What's new in 8.4 - Tags & filtering - Sync Figma and Storybook - Bootstrap eventbrite.fr/e/billets-stor…
1
14
1,345
🔥 24 hours to go! 🔥 Tomorrow we go LIVE to clear up all the myths about @storybookjs & @chromaticcom. Fast, simple, powerful—get the real story from the experts. 👀 DON’T MISS OUT: bit.ly/debunktop8myths
7
914
🆕 Run component tests—fast—on a group of stories. Want to use it in your project? 👇
1
5
26
2,118
⏰ 48 HOURS to go! ⏰ Got questions about @storybookjs & @chromaticcom? We’ve got answers! From setup to cost to performance—nothing’s off-limits. Let’s bust some myths. 🔗 SAVE YOUR SPOT: bit.ly/debunktop8myths #Storybook #OpenSource #Chromatic #DeployWithConfidence

ALT discovery channel lol GIF

2
745
Next Storybook Test early access office hours is happening in just under 2 hours. Come with your burning questions and @kylegach will be there to answer! Sign up here: storybook.js.org/sb-test-eap
1
837
In 3 days, @winkerVSbecks is going LIVE to tackle the wildest misconceptions about @storybookjs & @chromaticcom. Will he confirm or bust these myths? There’s only one way to find out. 👀 ➡️ SIGN UP: bit.ly/debunktop8myths #Storybook #Chromatic

ALT Reality Replacement GIF

5
2,416
Not even mad
1
5
67
6,073
🥾3: New tool for Bootstrap that monitors the use of deprecated classes in production. By @JulienDeramond, tech lead, Orange Design System
1
1
787