Skip to content

Commit 615fbc2

Browse files
committed
test: add test
1 parent 22f7be9 commit 615fbc2

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

packages/shared/__tests__/normalizeProp.spec.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { normalizeClass } from '../src'
1+
import { normalizeClass, parseStringStyle } from '../src'
22

33
describe('normalizeClass', () => {
44
test('handles string correctly', () => {
@@ -16,4 +16,31 @@ describe('normalizeClass', () => {
1616
'foo baz'
1717
)
1818
})
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+
})
1946
})

0 commit comments

Comments
 (0)