8
8
*
9
9
* @emails oncall+ui_infra
10
10
* @format
11
+ * @flow
11
12
*/
12
13
13
14
'use strict' ;
@@ -51,39 +52,39 @@ const expectPopulatedSpan = (stub, testString) => {
51
52
52
53
test ( 'must initialize correctly with an empty string, non-IE' , function ( ) {
53
54
initializeAsNonIE ( ) ;
54
- var stub = renderIntoContainer (
55
+ const stub = renderIntoContainer (
55
56
< DraftEditorTextNode > { '' } </ DraftEditorTextNode > ,
56
57
) ;
57
58
expect ( ReactDOM . findDOMNode ( stub ) . tagName ) . toBe ( 'BR' ) ;
58
59
} ) ;
59
60
60
61
test ( 'must initialize correctly with an empty string, IE' , function ( ) {
61
62
initializeAsIE ( ) ;
62
- var stub = renderIntoContainer (
63
+ const stub = renderIntoContainer (
63
64
< DraftEditorTextNode > { '' } </ DraftEditorTextNode > ,
64
65
) ;
65
66
expectPopulatedSpan ( stub , BLOCK_DELIMITER_CHAR ) ;
66
67
} ) ;
67
68
68
69
test ( 'must initialize correctly with a string, non-IE' , function ( ) {
69
70
initializeAsNonIE ( ) ;
70
- var stub = renderIntoContainer (
71
+ const stub = renderIntoContainer (
71
72
< DraftEditorTextNode > { TEST_A } </ DraftEditorTextNode > ,
72
73
) ;
73
74
expectPopulatedSpan ( stub , TEST_A ) ;
74
75
} ) ;
75
76
76
77
test ( 'must initialize correctly with a string, IE' , function ( ) {
77
78
initializeAsIE ( ) ;
78
- var stub = renderIntoContainer (
79
+ const stub = renderIntoContainer (
79
80
< DraftEditorTextNode > { TEST_A } </ DraftEditorTextNode > ,
80
81
) ;
81
82
expectPopulatedSpan ( stub , TEST_A ) ;
82
83
} ) ;
83
84
84
85
test ( 'must update from empty to non-empty, non-IE' , function ( ) {
85
86
initializeAsNonIE ( ) ;
86
- var stub = renderIntoContainer (
87
+ const stub = renderIntoContainer (
87
88
< DraftEditorTextNode > { '' } </ DraftEditorTextNode > ,
88
89
) ;
89
90
@@ -93,7 +94,7 @@ test('must update from empty to non-empty, non-IE', function() {
93
94
94
95
test ( 'must update from empty to non-empty, IE' , function ( ) {
95
96
initializeAsIE ( ) ;
96
- var stub = renderIntoContainer (
97
+ const stub = renderIntoContainer (
97
98
< DraftEditorTextNode > { '' } </ DraftEditorTextNode > ,
98
99
) ;
99
100
@@ -103,7 +104,7 @@ test('must update from empty to non-empty, IE', function() {
103
104
104
105
test ( 'must update from non-empty to non-empty, non-IE' , function ( ) {
105
106
initializeAsNonIE ( ) ;
106
- var stub = renderIntoContainer (
107
+ const stub = renderIntoContainer (
107
108
< DraftEditorTextNode > { TEST_A } </ DraftEditorTextNode > ,
108
109
) ;
109
110
@@ -119,7 +120,7 @@ test('must update from non-empty to non-empty, non-IE', function() {
119
120
120
121
test ( 'must update from non-empty to non-empty, non-IE' , function ( ) {
121
122
initializeAsIE ( ) ;
122
- var stub = renderIntoContainer (
123
+ const stub = renderIntoContainer (
123
124
< DraftEditorTextNode > { TEST_A } </ DraftEditorTextNode > ,
124
125
) ;
125
126
@@ -134,7 +135,7 @@ test('must update from non-empty to non-empty, non-IE', function() {
134
135
135
136
test ( 'must skip updates if text already matches DOM, non-IE' , function ( ) {
136
137
initializeAsNonIE ( ) ;
137
- var stub = renderIntoContainer (
138
+ const stub = renderIntoContainer (
138
139
< DraftEditorTextNode > { TEST_A } </ DraftEditorTextNode > ,
139
140
) ;
140
141
@@ -152,7 +153,7 @@ test('must skip updates if text already matches DOM, non-IE', function() {
152
153
153
154
test ( 'must skip updates if text already matches DOM, IE' , function ( ) {
154
155
initializeAsIE ( ) ;
155
- var stub = renderIntoContainer (
156
+ const stub = renderIntoContainer (
156
157
< DraftEditorTextNode > { TEST_A } </ DraftEditorTextNode > ,
157
158
) ;
158
159
@@ -170,7 +171,7 @@ test('must skip updates if text already matches DOM, IE', function() {
170
171
171
172
test ( 'must update from non-empty to empty, non-IE' , function ( ) {
172
173
initializeAsNonIE ( ) ;
173
- var stub = renderIntoContainer (
174
+ const stub = renderIntoContainer (
174
175
< DraftEditorTextNode > { TEST_A } </ DraftEditorTextNode > ,
175
176
) ;
176
177
@@ -181,7 +182,7 @@ test('must update from non-empty to empty, non-IE', function() {
181
182
182
183
test ( 'must update from non-empty to empty, IE' , function ( ) {
183
184
initializeAsIE ( ) ;
184
- var stub = renderIntoContainer (
185
+ const stub = renderIntoContainer (
185
186
< DraftEditorTextNode > { TEST_A } </ DraftEditorTextNode > ,
186
187
) ;
187
188
@@ -201,7 +202,7 @@ test('must render properly into a parent DOM node', function() {
201
202
202
203
test ( 'must force unchanged text back into the DOM' , function ( ) {
203
204
initializeAsNonIE ( ) ;
204
- var stub = renderIntoContainer (
205
+ const stub = renderIntoContainer (
205
206
< DraftEditorTextNode > { TEST_A } </ DraftEditorTextNode > ,
206
207
) ;
207
208
0 commit comments