File tree 5 files changed +463
-418
lines changed
5 files changed +463
-418
lines changed Original file line number Diff line number Diff line change
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports [` domToReact converts <textarea > correctly 1`] = `
4
+ <textarea
5
+ defaultValue = " foo"
6
+ />
7
+ `;
8
+
9
+ exports[`domToReact converts SVG element with viewBox attribute 1`] = `
10
+ <svg
11
+ id = " foo"
12
+ viewBox = " 0 0 512 512"
13
+ >
14
+ Inner
15
+ </svg >
16
+ `;
17
+
18
+ exports[`domToReact converts custom element with attributes 1`] = `
19
+ <custom-element
20
+ class = " myClass"
21
+ custom-attribute = " value"
22
+ style = {
23
+ {
24
+ " OTransition" : " all .5s" ,
25
+ " lineHeight" : " 1" ,
26
+ }
27
+ }
28
+ />
29
+ `;
30
+
31
+ exports[`domToReact converts multiple DOM nodes to React 1`] = `
32
+ [
33
+ <p >
34
+ foo
35
+ </p >,
36
+ <p >
37
+ bar
38
+ </p >,
39
+ ]
40
+ `;
41
+
42
+ exports[`domToReact converts single DOM node to React 1`] = `
43
+ <p >
44
+ foo
45
+ </p >
46
+ `;
47
+
48
+ exports[`domToReact does not escape <script > content 1`] = `
49
+ <script
50
+ dangerouslySetInnerHTML = {
51
+ {
52
+ " __html" : " alert(1 < 2);" ,
53
+ }
54
+ }
55
+ />
56
+ `;
57
+
58
+ exports[`domToReact does not escape <style > content 1`] = `
59
+ <style
60
+ dangerouslySetInnerHTML = {
61
+ {
62
+ " __html" : " body > .foo { color: #f00; }" ,
63
+ }
64
+ }
65
+ />
66
+ `;
67
+
68
+ exports[`domToReact skips doctype and comments 1`] = `
69
+ [
70
+ <p >
71
+ foo
72
+ </p >,
73
+ <p >
74
+ foo
75
+ </p >,
76
+ ]
77
+ `;
78
+
79
+ exports[`domToReact when React <16 removes unknown attributes 1`] = `
80
+ <custom-element
81
+ className = " myClass"
82
+ style = {
83
+ {
84
+ " OTransition" : " all .5s" ,
85
+ " lineHeight" : " 1" ,
86
+ }
87
+ }
88
+ />
89
+ `;
90
+
91
+ exports[`domToReact when React >=16 preserves unknown attributes 1`] = `
92
+ <custom-element
93
+ class = " myClass"
94
+ custom-attribute = " value"
95
+ style = {
96
+ {
97
+ " OTransition" : " all .5s" ,
98
+ " lineHeight" : " 1" ,
99
+ }
100
+ }
101
+ />
102
+ `;
103
+
104
+ exports[`transform option can wrap all elements 1`] = `
105
+ <div >
106
+ <ol >
107
+ <div >
108
+ <li >
109
+ <div >
110
+ One
111
+ </div >
112
+ </li >
113
+ </div >
114
+ <div >
115
+ <li
116
+ value = " 2"
117
+ >
118
+ <div >
119
+ Two
120
+ </div >
121
+ </li >
122
+ </div >
123
+ </ol >
124
+ </div >
125
+ `;
You can’t perform that action at this time.
0 commit comments