File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,19 +5,9 @@ import { RouterProvider } from "react-router";
55import router from './AppRoutes' ;
66
77if ( import . meta. env . DEV ) {
8- // You choose how to load the tests; this example uses Vite's glob import
9- const testModules = import . meta. glob ( "./**/*.twd.test.{ts,tsx}" ) ;
10- const { initTests, twd, TWDSidebar } = await import ( 'twd-js' ) ;
11- // You need to pass the test modules, the sidebar component, and createRoot function
12- initTests ( testModules , < TWDSidebar open = { true } position = "left" /> , createRoot ) ;
13- // if you want to use mock requests, you can initialize it here
14- twd . initRequestMocking ( )
15- . then ( ( ) => {
16- console . log ( "Request mocking initialized" ) ;
17- } )
18- . catch ( ( err ) => {
19- console . error ( "Error initializing request mocking:" , err ) ;
20- } ) ;
8+ const { initTWD } = await import ( 'twd-js/bundled' ) ;
9+ const tests = import . meta. glob ( "./**/*.twd.test.ts" )
10+ initTWD ( tests ) ;
2111}
2212
2313createRoot ( document . getElementById ( 'root' ) ! ) . render (
You can’t perform that action at this time.
0 commit comments