Record & mock your stories with HAR files.
pnpm add mock-storybook --dev
// .storybook/preview.js
export const loaders = withMocks({})([
...
])
Then, in your story:
```js
Story.parameters = {
mock: {
har: require('./path/to.har'),
handlers: [
]
}
}
-
Automate your story with a
.play()
function via Interactions. -
Capture a
.har
file:- Setup
test-storybook
- Run
test-storybook
- TODO – Automatically capture
.har
relative to story?
- Setup