@@ -90,19 +90,19 @@ test('ignores declarations without shadow functions', () => {
9090test ( 'throws error for wrong parameter count - too few' , ( ) => {
9191 throws ( ( ) => {
9292 run ( 'a { box-shadow: --sharp-shadow(1px 2px 3px); }' , '' )
93- } , / r e q u i r e s e x a c t l y 4 p a r a m e t e r s / )
93+ } , / r e q u i r e s 4 p a r a m s / )
9494} )
9595
9696test ( 'throws error for wrong parameter count - too many' , ( ) => {
9797 throws ( ( ) => {
9898 run ( 'a { box-shadow: --soft-shadow(1px 2px 3px red extra); }' , '' )
99- } , / r e q u i r e s e x a c t l y 4 p a r a m e t e r s / )
99+ } , / r e q u i r e s 4 p a r a m s / )
100100} )
101101
102102test ( 'throws error for wrong parameter count - no parameters' , ( ) => {
103103 throws ( ( ) => {
104104 run ( 'a { box-shadow: --linear-shadow(); }' , '' )
105- } , / r e q u i r e s e x a c t l y 4 p a r a m e t e r s / )
105+ } , / r e q u i r e s 4 p a r a m s / )
106106} )
107107
108108test ( 'handles different blur values for layer calculation' , ( ) => {
@@ -213,34 +213,19 @@ test('handles same shadow function multiple times in one declaration', () => {
213213test ( 'throws error for malformed parameters with extra spaces' , ( ) => {
214214 throws ( ( ) => {
215215 run ( 'a { box-shadow: --sharp-shadow(1px 2px 3px red extra); }' , '' )
216- } , / r e q u i r e s e x a c t l y 4 p a r a m e t e r s . * g o t 5 / )
216+ } , / r e q u i r e s 4 p a r a m s / )
217217} )
218218
219219test ( 'throws error for empty parameters' , ( ) => {
220220 throws ( ( ) => {
221221 run ( 'a { box-shadow: --linear-shadow( ); }' , '' )
222- } , / r e q u i r e s e x a c t l y 4 p a r a m e t e r s / )
222+ } , / r e q u i r e s 4 p a r a m s / )
223223} )
224224
225225test ( 'throws error when hex color is used as first argument' , ( ) => {
226226 throws ( ( ) => {
227227 run ( 'a { box-shadow: --sharp-shadow(#ff0000 2px 10px blue); }' , '' )
228- } , / f i r s t p a r a m e t e r m u s t b e a l e n g t h v a l u e .* g o t .* # f f 0 0 0 0 / )
229- } )
230-
231- test ( 'throws error when oklch() color is used as first argument' , ( ) => {
232- throws ( ( ) => {
233- run ( 'a { box-shadow: --soft-shadow(oklch(0.5 0.2 180) 2px 10px red); }' , '' )
234- } , / f i r s t p a r a m e t e r m u s t b e a l e n g t h v a l u e .* g o t .* o k l c h \( 0 \. 5 0 \. 2 1 8 0 \) / )
235- } )
236-
237- test ( 'throws error when rgba() color is used as first argument' , ( ) => {
238- throws ( ( ) => {
239- run (
240- 'a { box-shadow: --linear-shadow(rgba(255, 0, 0, 0.5) 2px 10px green); }' ,
241- ''
242- )
243- } , / f i r s t p a r a m e t e r m u s t b e a l e n g t h v a l u e .* g o t .* r g b a \( 2 5 5 , 0 , 0 , 0 \. 5 \) / )
228+ } , / f i r s t p a r a m e t e r m u s t b e a l e n g t h n o t c o l o r # f f 0 0 0 0 / )
244229} )
245230
246231test ( 'throws error when hsl() color is used as first argument' , ( ) => {
@@ -249,19 +234,19 @@ test('throws error when hsl() color is used as first argument', () => {
249234 'a { box-shadow: --sharp-shadow(hsl(0, 100%, 50%) 2px 10px black); }' ,
250235 ''
251236 )
252- } , / f i r s t p a r a m e t e r m u s t b e a l e n g t h v a l u e . * g o t . * h s l \( 0 , 1 0 0 % , 5 0 % \) / )
237+ } , / f i r s t p a r a m e t e r m u s t b e a l e n g t h n o t c o l o r h s l / )
253238} )
254239
255240test ( 'throws error when named color is used as first argument' , ( ) => {
256241 throws ( ( ) => {
257242 run ( 'a { box-shadow: --soft-shadow(red 2px 10px blue); }' , '' )
258- } , / f i r s t p a r a m e t e r m u s t b e a l e n g t h v a l u e . * g o t . * r e d / )
243+ } , / f i r s t p a r a m e t e r m u s t b e a l e n g t h n o t c o l o r r e d / )
259244} )
260245
261246test ( 'throws error when currentColor is used as first argument' , ( ) => {
262247 throws ( ( ) => {
263248 run ( 'a { box-shadow: --linear-shadow(currentColor 2px 10px red); }' , '' )
264- } , / f i r s t p a r a m e t e r m u s t b e a l e n g t h v a l u e . * g o t . * c u r r e n t C o l o r / )
249+ } , / f i r s t p a r a m e t e r m u s t b e a l e n g t h n o t c o l o r c u r r e n t C o l o r / )
265250} )
266251
267252test ( 'handles multiple --soft-shadow in same declaration' , ( ) => {
0 commit comments