Added tests with storybook and like API call with service interrupt test

This commit is contained in:
2026-06-17 15:36:27 -07:00
parent d42b11381f
commit f944c3aac6
8 changed files with 1093 additions and 31 deletions
+8 -1
View File
@@ -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>