|
1 |
| -/* global jest it, expect */ |
| 1 | +/* global it, expect */ |
2 | 2 | import transformCss, { getStylesForProperty } from '.'
|
3 | 3 |
|
4 | 4 | const runTest = (inputCss, expectedStyles) => {
|
@@ -489,22 +489,6 @@ it('transforms box-shadow without blur-radius', () =>
|
489 | 489 | shadowOpacity: 1,
|
490 | 490 | }))
|
491 | 491 |
|
492 |
| -it('transforms box-shadow without color', () => |
493 |
| - runTest([['box-shadow', '10px 20px 30px']], { |
494 |
| - shadowOffset: { width: 10, height: 20 }, |
495 |
| - shadowRadius: 30, |
496 |
| - shadowColor: 'black', |
497 |
| - shadowOpacity: 1, |
498 |
| - })) |
499 |
| - |
500 |
| -it('transforms box-shadow without blur-radius, color', () => |
501 |
| - runTest([['box-shadow', '10px 20px']], { |
502 |
| - shadowOffset: { width: 10, height: 20 }, |
503 |
| - shadowRadius: 0, |
504 |
| - shadowColor: 'black', |
505 |
| - shadowOpacity: 1, |
506 |
| - })) |
507 |
| - |
508 | 492 | it('transforms box-shadow with rgb color', () =>
|
509 | 493 | runTest([['box-shadow', '10px 20px rgb(100, 100, 100)']], {
|
510 | 494 | shadowOffset: { width: 10, height: 20 },
|
@@ -551,10 +535,13 @@ it('transforms box-shadow enforces offset to be present', () => {
|
551 | 535 | )
|
552 | 536 | })
|
553 | 537 |
|
554 |
| -it('transforms box-shadow and enforces offset-y if offset-x present', () => { |
555 |
| - expect(() => transformCss([['box-shadow', '10px']])).toThrow( |
556 |
| - 'Failed to parse declaration "boxShadow: 10px"' |
557 |
| - ) |
| 538 | +it('transforms box-shadow and enforces offset-x and offset-y', () => { |
| 539 | + expect(() => transformCss([['box-shadow', 'black']])).toThrow() |
| 540 | + expect(() => transformCss([['box-shadow', '10px black']])).toThrow() |
| 541 | +}) |
| 542 | + |
| 543 | +it('transforms box-shadow and enforces color', () => { |
| 544 | + expect(() => transformCss([['text-decoration', '10px 20px 30px']])).toThrow() |
558 | 545 | })
|
559 | 546 |
|
560 | 547 | it('transforms text-decoration into text-decoration- properties', () =>
|
|
0 commit comments