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

Commit

Permalink
var => const on remaining file
Browse files Browse the repository at this point in the history
Summary: Saw this flagged in Quality Analyser tool. Also added flow to the file.

Reviewed By: vdurmont

Differential Revision: D9674403

fbshipit-source-id: 1705cb7271b0eeda397d79a7b5f853f28fe94de1
  • Loading branch information
niveditc authored and facebook-github-bot committed Sep 6, 2018
1 parent 6b83312 commit 022798c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/model/encoding/__tests__/decodeEntityRanges-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@
* of patent rights can be found in the PATENTS file in the same directory.
*
* @emails oncall+draft_js
* @flow strict-local
* @format
*/

'use strict';

jest.disableAutomock();

var decodeEntityRanges = require('decodeEntityRanges');
const decodeEntityRanges = require('decodeEntityRanges');

test('must decode when no entities present', () => {
var decoded = decodeEntityRanges(' '.repeat(20), []);
const decoded = decodeEntityRanges(' '.repeat(20), []);
expect(decoded).toMatchSnapshot();
});

test('must decode when an entity is present', () => {
var decoded = decodeEntityRanges(' '.repeat(5), [
const decoded = decodeEntityRanges(' '.repeat(5), [
{
offset: 2,
length: 2,
Expand All @@ -33,7 +34,7 @@ test('must decode when an entity is present', () => {
});

test('must decode when multiple entities present', () => {
var decoded = decodeEntityRanges(' '.repeat(8), [
const decoded = decodeEntityRanges(' '.repeat(8), [
{
offset: 2,
length: 2,
Expand All @@ -49,7 +50,7 @@ test('must decode when multiple entities present', () => {
});

test('must decode when an entity is present more than once', () => {
var decoded = decodeEntityRanges(' '.repeat(8), [
const decoded = decodeEntityRanges(' '.repeat(8), [
{
offset: 2,
length: 2,
Expand All @@ -65,7 +66,7 @@ test('must decode when an entity is present more than once', () => {
});

test('must handle ranges that include surrogate pairs', () => {
var decoded = decodeEntityRanges('Take a \uD83D\uDCF7 #selfie', [
const decoded = decodeEntityRanges('Take a \uD83D\uDCF7 #selfie', [
{
offset: 6,
length: 5,
Expand Down

0 comments on commit 022798c

Please sign in to comment.