File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
packages/shared/__tests__ Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change 1
- import { normalizeClass } from '../src'
1
+ import { normalizeClass , parseStringStyle } from '../src'
2
2
3
3
describe ( 'normalizeClass' , ( ) => {
4
4
test ( 'handles string correctly' , ( ) => {
@@ -16,4 +16,31 @@ describe('normalizeClass', () => {
16
16
'foo baz'
17
17
)
18
18
} )
19
+
20
+ // #6777
21
+ test ( 'parse multi-line inline style' , ( ) => {
22
+ expect (
23
+ parseStringStyle ( `border: 1px solid transparent;
24
+ background: linear-gradient(white, white) padding-box,
25
+ repeating-linear-gradient(
26
+ -45deg,
27
+ #ccc 0,
28
+ #ccc 0.5em,
29
+ white 0,
30
+ white 0.75em
31
+ );` )
32
+ ) . toMatchInlineSnapshot ( `
33
+ Object {
34
+ "background": "linear-gradient(white, white) padding-box,
35
+ repeating-linear-gradient(
36
+ -45deg,
37
+ #ccc 0,
38
+ #ccc 0.5em,
39
+ white 0,
40
+ white 0.75em
41
+ )",
42
+ "border": "1px solid transparent",
43
+ }
44
+ ` )
45
+ } )
19
46
} )
You can’t perform that action at this time.
0 commit comments