Skip to content

Commit 396bab3

Browse files
committed
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
1 parent c0f280c commit 396bab3

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/tests/sourcemaps

1 file changed

+1
-1
lines changed

packages/svelte/tests/sourcemaps/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const { test, run } = suite<SourcemapTest>(async (config, cwd) => {
5050
css = { code: '', map: /** @type {any} */ null };
5151
}
5252

53-
js.code = js.code.replace(/generated by Svelte v\d+\.\d+\.\d+/, (match) =>
53+
js.code = js.code.replace(/\(Svelte v\d+\.\d+\.\d+(-next\.\d+)?/, (match) =>
5454
match.replace(/\d/g, 'x')
5555
);
5656

0 commit comments

Comments
 (0)