@@ -14,7 +14,6 @@ describe('Vite bundler compatibility', () => {
1414 }
1515
1616 // Run vite build
17- // We use npx to ensure we use the project's vite
1817 execSync ( 'npx vite build' , { cwd : testDir , stdio : 'inherit' } ) ;
1918
2019 // 1. Check if hashed WASM file exists in dist/assets
@@ -25,7 +24,6 @@ describe('Vite bundler compatibility', () => {
2524 ) ;
2625
2726 expect ( wasmFile ) . toBeDefined ( ) ;
28- console . log ( 'Found hashed WASM file:' , wasmFile ) ;
2927
3028 // 2. Check if the JS bundle contains the hashed WASM filename
3129 const assetsDirJs = path . resolve ( distDir , 'assets' ) ;
@@ -41,11 +39,9 @@ describe('Vite bundler compatibility', () => {
4139 ) ;
4240
4341 // It should contain something like: new URL("/assets/sqlite3-hash.wasm", import.meta.url)
44- // Vite might use different quotes or spacing, but it should definitely have the hashed filename.
4542 expect ( bundleContent ) . toContain ( wasmFile ) ;
4643
4744 // Specifically check that it's part of a new URL call or at least correctly referenced
48- // In our previous check it was: new URL("/assets/sqlite3-Bguoklsa.wasm",import.meta.url)
4945 const urlPattern = new RegExp (
5046 `new URL\\(".*${ wasmFile } ",\\s*import\\.meta\\.url\\)` ,
5147 ) ;
0 commit comments