Skip to content

Commit ff1ead6

Browse files
authored
fix: fixed failing tests (#157)
1 parent 32c8726 commit ff1ead6

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

package-lock.json

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/__tests__/bundler-compatibility.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ describe('Vite bundler compatibility', () => {
4545
expect(bundleContent).toContain(wasmFile);
4646

4747
// Specifically check that it's part of a new URL call or at least correctly referenced
48+
// The exact format can vary based on the bundler's minification/transformations
4849
const urlPattern = new RegExp(
49-
`new URL\\(".*${wasmFile}",\\s*import\\.meta\\.url\\)`,
50+
`new URL\\(["'\`][^"'\`]*${wasmFile}["'\`],\\s*(?:["'\`]{2}\\+)?import\\.meta\\.url\\)`,
5051
);
5152
expect(bundleContent).toMatch(urlPattern);
5253
});

0 commit comments

Comments
 (0)