Skip to content

Commit dcc2b00

Browse files
Fix Svelte tests that don't auto-update
1 parent d01d9b7 commit dcc2b00

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

integrations/vite/svelte.test.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ test(
100100

101101
await fs.expectFileToContain(files[0][0], [
102102
candidate`underline`,
103-
'.global{color:var(--color-green-500);animation:2s ease-in-out infinite globalKeyframes}',
104-
/\.local.svelte-.*\{color:var\(--color-red-500\);animation:2s ease-in-out infinite svelte-.*-localKeyframes\}/,
103+
'.global{color:var(--color-green-500,oklch(.723 .219 149.579));animation:2s ease-in-out infinite globalKeyframes}',
104+
/\.local.svelte-.*\{color:var\(--color-red-500\,oklch\(\.637 \.237 25\.331\)\);animation:2s ease-in-out infinite svelte-.*-localKeyframes\}/,
105105
/@keyframes globalKeyframes\{/,
106106
/@keyframes svelte-.*-localKeyframes\{/,
107107
])
@@ -213,10 +213,10 @@ test(
213213
let [, css] = files[0]
214214
expect(css).toContain(candidate`underline`)
215215
expect(css).toContain(
216-
'.global{color:var(--color-green-500);animation:2s ease-in-out infinite globalKeyframes}',
216+
'.global{color:var(--color-green-500,oklch(.723 .219 149.579));animation:2s ease-in-out infinite globalKeyframes}',
217217
)
218218
expect(css).toMatch(
219-
/\.local.svelte-.*\{color:var\(--color-red-500\);animation:2s ease-in-out infinite svelte-.*-localKeyframes\}/,
219+
/\.local.svelte-.*\{color:var\(--color-red-500,oklch\(\.637 \.237 25\.331\)\);animation:2s ease-in-out infinite svelte-.*-localKeyframes\}/,
220220
)
221221
expect(css).toMatch(/@keyframes globalKeyframes\{/)
222222
expect(css).toMatch(/@keyframes svelte-.*-localKeyframes\{/)
@@ -238,14 +238,16 @@ test(
238238
let [, css] = files[0]
239239
expect(css).toContain(candidate`font-bold`)
240240
expect(css).toContain(
241-
'.global{color:var(--color-green-500);animation:2s ease-in-out infinite globalKeyframes}',
241+
'.global{color:var(--color-green-500,oklch(.723 .219 149.579));animation:2s ease-in-out infinite globalKeyframes}',
242242
)
243243
expect(css).toMatch(
244-
/\.local.svelte-.*\{color:var\(--color-red-500\);animation:2s ease-in-out infinite svelte-.*-localKeyframes\}/,
244+
/\.local.svelte-.*\{color:var\(--color-red-500,oklch\(\.637 \.237 25\.331\)\);animation:2s ease-in-out infinite svelte-.*-localKeyframes\}/,
245245
)
246246
expect(css).toMatch(/@keyframes globalKeyframes\{/)
247247
expect(css).toMatch(/@keyframes svelte-.*-localKeyframes\{/)
248-
expect(css).toMatch(/\.bar.svelte-.*\{color:var\(--color-pink-500\)\}/)
248+
expect(css).toMatch(
249+
/\.bar.svelte-.*\{color:var\(--color-pink-500,oklch\(\.656 \.241 354\.308\)\)\}/,
250+
)
249251
})
250252
},
251253
)

0 commit comments

Comments
 (0)