chore: fix version replacement regex in test

We're now on Svelte v5.0.0-next.42 which made one test match the 42 of the next version instead of the number in the code, resulting in that test suddenly failing. This fixes the regex to replace that number with x's instead
pull/10354/head
Simon Holthausen 11 months ago
parent c0f280c7e7
commit 396bab3628

@ -50,7 +50,7 @@ const { test, run } = suite<SourcemapTest>(async (config, cwd) => {
css = { code: '', map: /** @type {any} */ null }; css = { code: '', map: /** @type {any} */ null };
} }
js.code = js.code.replace(/generated by Svelte v\d+\.\d+\.\d+/, (match) => js.code = js.code.replace(/\(Svelte v\d+\.\d+\.\d+(-next\.\d+)?/, (match) =>
match.replace(/\d/g, 'x') match.replace(/\d/g, 'x')
); );

Loading…
Cancel
Save