File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,10 @@ Now just **3 lines** with auto-mocking:
7272
7373``` typescript
7474// src/mocks/browser.ts - NEW WAY
75- const mswPlugin = new MSWPlugin ({ baseUrl: ' /api/v1' });
76- const runtime = new ObjectStackKernel ([appConfig , mswPlugin ]);
77- await runtime .start (); // Auto-mocks ALL endpoints!
75+ const kernel = new ObjectKernel ();
76+ kernel .use (new AppManifestPlugin (appConfig ));
77+ kernel .use (new MSWPlugin ({ baseUrl: ' /api/v1' }));
78+ await kernel .bootstrap (); // Auto-mocks ALL endpoints!
7879```
7980
8081## 📦 How It Works
@@ -140,10 +141,13 @@ const customHandlers = [
140141 )
141142];
142143
143- const mswPlugin = new MSWPlugin ({
144+ const kernel = new ObjectKernel ();
145+ kernel .use (new AppManifestPlugin (appConfig ));
146+ kernel .use (new MSWPlugin ({
144147 customHandlers , // Add your custom handlers
145148 baseUrl: ' /api/v1'
146- });
149+ }));
150+ await kernel .bootstrap ();
147151```
148152
149153## Troubleshooting
You can’t perform that action at this time.
0 commit comments