From 18dabb7327179df5a2b500e27bfe46328e0debe1 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 9 Jul 2024 17:17:29 -0400 Subject: [PATCH] fix sourcemap test --- .../tests/sourcemaps/samples/css-injected-map/_config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/svelte/tests/sourcemaps/samples/css-injected-map/_config.js b/packages/svelte/tests/sourcemaps/samples/css-injected-map/_config.js index 845d677bc6..74a2185076 100644 --- a/packages/svelte/tests/sourcemaps/samples/css-injected-map/_config.js +++ b/packages/svelte/tests/sourcemaps/samples/css-injected-map/_config.js @@ -30,10 +30,10 @@ export default test({ async test({ assert, code_client }) { // Check that the css source map embedded in the js is accurate const match = code_client.match( - /append_styles\(\$\$anchor, "svelte-.{6}", "(.*?)(?:\\n\/\*# sourceMappingURL=data:(.*?);charset=(.*?);base64,(.*?) \*\/)?"\);/ + /code: "(.*?)(?:\\n\/\*# sourceMappingURL=data:(.*?);charset=(.*?);base64,(.*?) \*\/)?"/ ); - assert.notEqual(match, null); + assert.ok(match); const [css, mime_type, encoding, css_map_base64] = /** @type {RegExpMatchArray} */ ( match