@@ -64,12 +64,12 @@ test(
6464 'src/other.css' : css `
6565 .local {
6666 @apply text-red-500;
67- animation: 2s ease-in-out 0s infinite localKeyframes;
67+ animation: 2s ease-in-out infinite localKeyframes;
6868 }
6969
7070 :global(.global) {
7171 @apply text-green-500;
72- animation: 2s ease-in-out 0s infinite globalKeyframes;
72+ animation: 2s ease-in-out infinite globalKeyframes;
7373 }
7474
7575 @keyframes -global-globalKeyframes {
@@ -93,18 +93,21 @@ test(
9393 } ,
9494 } ,
9595 async ( { exec, fs, expect } ) => {
96- await exec ( 'pnpm vite build' )
96+ let output = await exec ( 'pnpm vite build' )
9797
9898 let files = await fs . glob ( 'dist/**/*.css' )
9999 expect ( files ) . toHaveLength ( 1 )
100100
101101 await fs . expectFileToContain ( files [ 0 ] [ 0 ] , [
102102 candidate `underline` ,
103- '.global{color:var(--color-green-500);animation:2s ease-in-out 0s infinite globalKeyframes}' ,
104- / \. l o c a l .s v e l t e - .* \{ c o l o r : v a r \( - - c o l o r - r e d - 5 0 0 \) ; a n i m a t i o n : 2 s e a s e - i n - o u t 0 s i n f i n i t e s v e l t e - .* - l o c a l K e y f r a m e s \} / ,
103+ '.global{color:var(--color-green-500);animation:2s ease-in-out infinite globalKeyframes}' ,
104+ / \. l o c a l .s v e l t e - .* \{ c o l o r : v a r \( - - c o l o r - r e d - 5 0 0 \) ; a n i m a t i o n : 2 s e a s e - i n - o u t i n f i n i t e s v e l t e - .* - l o c a l K e y f r a m e s \} / ,
105105 / @ k e y f r a m e s g l o b a l K e y f r a m e s \{ / ,
106106 / @ k e y f r a m e s s v e l t e - .* - l o c a l K e y f r a m e s \{ / ,
107107 ] )
108+
109+ // Should not print any warnings
110+ expect ( output ) . not . toContain ( 'vite-plugin-svelte' )
108111 } ,
109112)
110113
@@ -172,12 +175,12 @@ test(
172175 'src/other.css' : css `
173176 .local {
174177 @apply text-red-500;
175- animation: 2s ease-in-out 0s infinite localKeyframes;
178+ animation: 2s ease-in-out infinite localKeyframes;
176179 }
177180
178181 :global(.global) {
179182 @apply text-green-500;
180- animation: 2s ease-in-out 0s infinite globalKeyframes;
183+ animation: 2s ease-in-out infinite globalKeyframes;
181184 }
182185
183186 @keyframes -global-globalKeyframes {
@@ -210,10 +213,10 @@ test(
210213 let [ , css ] = files [ 0 ]
211214 expect ( css ) . toContain ( candidate `underline` )
212215 expect ( css ) . toContain (
213- '.global{color:var(--color-green-500);animation:2s ease-in-out 0s infinite globalKeyframes}' ,
216+ '.global{color:var(--color-green-500);animation:2s ease-in-out infinite globalKeyframes}' ,
214217 )
215218 expect ( css ) . toMatch (
216- / \. l o c a l .s v e l t e - .* \{ c o l o r : v a r \( - - c o l o r - r e d - 5 0 0 \) ; a n i m a t i o n : 2 s e a s e - i n - o u t 0 s i n f i n i t e s v e l t e - .* - l o c a l K e y f r a m e s \} / ,
219+ / \. l o c a l .s v e l t e - .* \{ c o l o r : v a r \( - - c o l o r - r e d - 5 0 0 \) ; a n i m a t i o n : 2 s e a s e - i n - o u t i n f i n i t e s v e l t e - .* - l o c a l K e y f r a m e s \} / ,
217220 )
218221 expect ( css ) . toMatch ( / @ k e y f r a m e s g l o b a l K e y f r a m e s \{ / )
219222 expect ( css ) . toMatch ( / @ k e y f r a m e s s v e l t e - .* - l o c a l K e y f r a m e s \{ / )
@@ -235,10 +238,10 @@ test(
235238 let [ , css ] = files [ 0 ]
236239 expect ( css ) . toContain ( candidate `font-bold` )
237240 expect ( css ) . toContain (
238- '.global{color:var(--color-green-500);animation:2s ease-in-out 0s infinite globalKeyframes}' ,
241+ '.global{color:var(--color-green-500);animation:2s ease-in-out infinite globalKeyframes}' ,
239242 )
240243 expect ( css ) . toMatch (
241- / \. l o c a l .s v e l t e - .* \{ c o l o r : v a r \( - - c o l o r - r e d - 5 0 0 \) ; a n i m a t i o n : 2 s e a s e - i n - o u t 0 s i n f i n i t e s v e l t e - .* - l o c a l K e y f r a m e s \} / ,
244+ / \. l o c a l .s v e l t e - .* \{ c o l o r : v a r \( - - c o l o r - r e d - 5 0 0 \) ; a n i m a t i o n : 2 s e a s e - i n - o u t i n f i n i t e s v e l t e - .* - l o c a l K e y f r a m e s \} / ,
242245 )
243246 expect ( css ) . toMatch ( / @ k e y f r a m e s g l o b a l K e y f r a m e s \{ / )
244247 expect ( css ) . toMatch ( / @ k e y f r a m e s s v e l t e - .* - l o c a l K e y f r a m e s \{ / )
0 commit comments