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

Commit 022798c

Browse files
niveditcfacebook-github-bot
authored andcommitted
var => const on remaining file
Summary: Saw this flagged in Quality Analyser tool. Also added flow to the file. Reviewed By: vdurmont Differential Revision: D9674403 fbshipit-source-id: 1705cb7271b0eeda397d79a7b5f853f28fe94de1
1 parent 6b83312 commit 022798c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/model/encoding/__tests__/decodeEntityRanges-test.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*
99
* @emails oncall+draft_js
10+
* @flow strict-local
1011
* @format
1112
*/
1213

1314
'use strict';
1415

1516
jest.disableAutomock();
1617

17-
var decodeEntityRanges = require('decodeEntityRanges');
18+
const decodeEntityRanges = require('decodeEntityRanges');
1819

1920
test('must decode when no entities present', () => {
20-
var decoded = decodeEntityRanges(' '.repeat(20), []);
21+
const decoded = decodeEntityRanges(' '.repeat(20), []);
2122
expect(decoded).toMatchSnapshot();
2223
});
2324

2425
test('must decode when an entity is present', () => {
25-
var decoded = decodeEntityRanges(' '.repeat(5), [
26+
const decoded = decodeEntityRanges(' '.repeat(5), [
2627
{
2728
offset: 2,
2829
length: 2,
@@ -33,7 +34,7 @@ test('must decode when an entity is present', () => {
3334
});
3435

3536
test('must decode when multiple entities present', () => {
36-
var decoded = decodeEntityRanges(' '.repeat(8), [
37+
const decoded = decodeEntityRanges(' '.repeat(8), [
3738
{
3839
offset: 2,
3940
length: 2,
@@ -49,7 +50,7 @@ test('must decode when multiple entities present', () => {
4950
});
5051

5152
test('must decode when an entity is present more than once', () => {
52-
var decoded = decodeEntityRanges(' '.repeat(8), [
53+
const decoded = decodeEntityRanges(' '.repeat(8), [
5354
{
5455
offset: 2,
5556
length: 2,
@@ -65,7 +66,7 @@ test('must decode when an entity is present more than once', () => {
6566
});
6667

6768
test('must handle ranges that include surrogate pairs', () => {
68-
var decoded = decodeEntityRanges('Take a \uD83D\uDCF7 #selfie', [
69+
const decoded = decodeEntityRanges('Take a \uD83D\uDCF7 #selfie', [
6970
{
7071
offset: 6,
7172
length: 5,

0 commit comments

Comments
 (0)