Skip to content
Snippets Groups Projects
Unverified Commit 225a8e11 authored by Acid Chicken (硫酸鶏)'s avatar Acid Chicken (硫酸鶏)
Browse files

docs: fix

parent 899c6241
No related branches found
No related tags found
No related merge requests found
......@@ -268,18 +268,14 @@ import MyComponent from './MyComponent.vue';
void MyComponent;
```
You can use msw to mock API requests in the storybook. Creating a `MyComponent.stories.msw.ts` file and add the following line to the file.
You can use msw to mock API requests in the storybook. Creating a `MyComponent.stories.msw.ts` file to define the mock handlers.
```ts
import { rest } from 'msw';
export const handlers = [
rest.post('/api/notes/timeline', (req, res, ctx) => {
return res(
ctx.json({
notes: [],
users: [],
hasNext: false,
})
ctx.json([]),
);
}),
];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment