Added tests with storybook and like API call with service interrupt test
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import React from 'react';
|
||||
import { Provider } from '../src/components/ui/provider'; // Adjust path if needed
|
||||
import { Provider } from '../src/components/ui/provider';
|
||||
// 1. Import MSW
|
||||
import { initialize, mswLoader } from 'msw-storybook-addon';
|
||||
|
||||
// 2. Initialize MSW
|
||||
initialize();
|
||||
|
||||
/** @type { import('@storybook/react').Preview } */
|
||||
const preview = {
|
||||
@@ -18,6 +23,8 @@ const preview = {
|
||||
],
|
||||
},
|
||||
},
|
||||
// 3. Add the MSW loader so it intercepts network requests in your stories
|
||||
loaders: [mswLoader],
|
||||
decorators: [
|
||||
(Story) => (
|
||||
<Provider>
|
||||
|
||||
Reference in New Issue
Block a user