Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 0f58b64

Browse files
niveditcfacebook-github-bot
authored andcommitted
var => const on test files
Summary: I missed these in D7803975 :) Reviewed By: mitermayer Differential Revision: D8346232 fbshipit-source-id: 5f27156608ee031c729e5ea1ffe6110bbcb6659b
1 parent 0bb8d76 commit 0f58b64

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/component/contents/__tests__/DraftEditorBlock.react-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ test('must split styled spans apart within decorator', () => {
442442
arePropsEqual(el.children[0], {offsetKey: 'a-0-0'});
443443
expect(el.children[0].type).toBe(DecoratorSpan);
444444

445-
var renderer = el.children[0].props;
445+
const renderer = el.children[0].props;
446446
arePropsEqual(renderer.children[0], {offsetKey: 'a-0-0', styleSet: BOLD});
447447
expect(renderer.children[0].type).toBe(DraftEditorLeaf);
448448

src/component/contents/__tests__/DraftEditorTextNode-test.js

+14-13
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*
99
* @emails oncall+ui_infra
1010
* @format
11+
* @flow
1112
*/
1213

1314
'use strict';
@@ -51,39 +52,39 @@ const expectPopulatedSpan = (stub, testString) => {
5152

5253
test('must initialize correctly with an empty string, non-IE', function() {
5354
initializeAsNonIE();
54-
var stub = renderIntoContainer(
55+
const stub = renderIntoContainer(
5556
<DraftEditorTextNode>{''}</DraftEditorTextNode>,
5657
);
5758
expect(ReactDOM.findDOMNode(stub).tagName).toBe('BR');
5859
});
5960

6061
test('must initialize correctly with an empty string, IE', function() {
6162
initializeAsIE();
62-
var stub = renderIntoContainer(
63+
const stub = renderIntoContainer(
6364
<DraftEditorTextNode>{''}</DraftEditorTextNode>,
6465
);
6566
expectPopulatedSpan(stub, BLOCK_DELIMITER_CHAR);
6667
});
6768

6869
test('must initialize correctly with a string, non-IE', function() {
6970
initializeAsNonIE();
70-
var stub = renderIntoContainer(
71+
const stub = renderIntoContainer(
7172
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
7273
);
7374
expectPopulatedSpan(stub, TEST_A);
7475
});
7576

7677
test('must initialize correctly with a string, IE', function() {
7778
initializeAsIE();
78-
var stub = renderIntoContainer(
79+
const stub = renderIntoContainer(
7980
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
8081
);
8182
expectPopulatedSpan(stub, TEST_A);
8283
});
8384

8485
test('must update from empty to non-empty, non-IE', function() {
8586
initializeAsNonIE();
86-
var stub = renderIntoContainer(
87+
const stub = renderIntoContainer(
8788
<DraftEditorTextNode>{''}</DraftEditorTextNode>,
8889
);
8990

@@ -93,7 +94,7 @@ test('must update from empty to non-empty, non-IE', function() {
9394

9495
test('must update from empty to non-empty, IE', function() {
9596
initializeAsIE();
96-
var stub = renderIntoContainer(
97+
const stub = renderIntoContainer(
9798
<DraftEditorTextNode>{''}</DraftEditorTextNode>,
9899
);
99100

@@ -103,7 +104,7 @@ test('must update from empty to non-empty, IE', function() {
103104

104105
test('must update from non-empty to non-empty, non-IE', function() {
105106
initializeAsNonIE();
106-
var stub = renderIntoContainer(
107+
const stub = renderIntoContainer(
107108
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
108109
);
109110

@@ -119,7 +120,7 @@ test('must update from non-empty to non-empty, non-IE', function() {
119120

120121
test('must update from non-empty to non-empty, non-IE', function() {
121122
initializeAsIE();
122-
var stub = renderIntoContainer(
123+
const stub = renderIntoContainer(
123124
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
124125
);
125126

@@ -134,7 +135,7 @@ test('must update from non-empty to non-empty, non-IE', function() {
134135

135136
test('must skip updates if text already matches DOM, non-IE', function() {
136137
initializeAsNonIE();
137-
var stub = renderIntoContainer(
138+
const stub = renderIntoContainer(
138139
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
139140
);
140141

@@ -152,7 +153,7 @@ test('must skip updates if text already matches DOM, non-IE', function() {
152153

153154
test('must skip updates if text already matches DOM, IE', function() {
154155
initializeAsIE();
155-
var stub = renderIntoContainer(
156+
const stub = renderIntoContainer(
156157
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
157158
);
158159

@@ -170,7 +171,7 @@ test('must skip updates if text already matches DOM, IE', function() {
170171

171172
test('must update from non-empty to empty, non-IE', function() {
172173
initializeAsNonIE();
173-
var stub = renderIntoContainer(
174+
const stub = renderIntoContainer(
174175
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
175176
);
176177

@@ -181,7 +182,7 @@ test('must update from non-empty to empty, non-IE', function() {
181182

182183
test('must update from non-empty to empty, IE', function() {
183184
initializeAsIE();
184-
var stub = renderIntoContainer(
185+
const stub = renderIntoContainer(
185186
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
186187
);
187188

@@ -201,7 +202,7 @@ test('must render properly into a parent DOM node', function() {
201202

202203
test('must force unchanged text back into the DOM', function() {
203204
initializeAsNonIE();
204-
var stub = renderIntoContainer(
205+
const stub = renderIntoContainer(
205206
<DraftEditorTextNode>{TEST_A}</DraftEditorTextNode>,
206207
);
207208

0 commit comments

Comments
 (0)