🙅 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
Check our newest blog post, or read on for the highlights.
https://storybook.js.org/blog/component-testing-rscs/
🙌 Component testing RSCs in the browser, with mocked complex app states and reliable speed
Check our newest blog post, or read on for the highlights.
https://storybook.js.org/blog/component-testing-rscs/
Comments
- 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
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.
@vitest.dev.