diff --git a/ReactAndroid/src/androidTest/js/Asserts.js b/ReactAndroid/src/androidTest/js/Asserts.js index 0a684d0b3cd30d..0eb0fd4fa3ee50 100644 --- a/ReactAndroid/src/androidTest/js/Asserts.js +++ b/ReactAndroid/src/androidTest/js/Asserts.js @@ -9,9 +9,9 @@ 'use strict'; -var Assert = require('NativeModules').Assert; +const Assert = require('NativeModules').Assert; -var Asserts = { +const Asserts = { assertEquals: function(expected, actual, msg) { if (expected !== actual) { Assert.fail( diff --git a/ReactAndroid/src/androidTest/js/CatalystRootViewTestModule.js b/ReactAndroid/src/androidTest/js/CatalystRootViewTestModule.js index b5c710dbeeaf4e..e797ad07a23f86 100644 --- a/ReactAndroid/src/androidTest/js/CatalystRootViewTestModule.js +++ b/ReactAndroid/src/androidTest/js/CatalystRootViewTestModule.js @@ -9,9 +9,9 @@ 'use strict'; -var React = require('React'); -var Recording = require('NativeModules').Recording; -var View = require('View'); +const React = require('React'); +const Recording = require('NativeModules').Recording; +const View = require('View'); class CatalystRootViewTestApp extends React.Component { componentWillUnmount() { diff --git a/ReactAndroid/src/androidTest/js/DatePickerDialogTestModule.js b/ReactAndroid/src/androidTest/js/DatePickerDialogTestModule.js index 1f4699e7c7c707..0bc26d185e8a38 100644 --- a/ReactAndroid/src/androidTest/js/DatePickerDialogTestModule.js +++ b/ReactAndroid/src/androidTest/js/DatePickerDialogTestModule.js @@ -9,11 +9,12 @@ 'use strict'; -var BatchedBridge = require('BatchedBridge'); -var DatePickerAndroid = require('DatePickerAndroid'); -var React = require('React'); -var RecordingModule = require('NativeModules').DatePickerDialogRecordingModule; -var View = require('View'); +const BatchedBridge = require('BatchedBridge'); +const DatePickerAndroid = require('DatePickerAndroid'); +const React = require('React'); +const RecordingModule = require('NativeModules') + .DatePickerDialogRecordingModule; +const View = require('View'); class DatePickerDialogTestApp extends React.Component { render() { @@ -21,7 +22,7 @@ class DatePickerDialogTestApp extends React.Component { } } -var DatePickerDialogTestModule = { +const DatePickerDialogTestModule = { DatePickerDialogTestApp: DatePickerDialogTestApp, showDatePickerDialog: function(options) { DatePickerAndroid.open(options).then( diff --git a/ReactAndroid/src/androidTest/js/ImageOverlayColorTestApp.js b/ReactAndroid/src/androidTest/js/ImageOverlayColorTestApp.js index 2461983ba6739a..2cb30a20e1db7a 100644 --- a/ReactAndroid/src/androidTest/js/ImageOverlayColorTestApp.js +++ b/ReactAndroid/src/androidTest/js/ImageOverlayColorTestApp.js @@ -9,8 +9,8 @@ 'use strict'; -var React = require('React'); -var Image = require('Image'); +const React = require('React'); +const Image = require('Image'); class ImageOverlayColorTestApp extends React.Component { render() { diff --git a/ReactAndroid/src/androidTest/js/InitialPropsTestApp.js b/ReactAndroid/src/androidTest/js/InitialPropsTestApp.js index 0894466d0987f4..d6a7270ba5bc5e 100644 --- a/ReactAndroid/src/androidTest/js/InitialPropsTestApp.js +++ b/ReactAndroid/src/androidTest/js/InitialPropsTestApp.js @@ -9,9 +9,9 @@ 'use strict'; -var React = require('React'); -var RecordingModule = require('NativeModules').InitialPropsRecordingModule; -var Text = require('Text'); +const React = require('React'); +const RecordingModule = require('NativeModules').InitialPropsRecordingModule; +const Text = require('Text'); class InitialPropsTestApp extends React.Component { componentDidMount() { diff --git a/ReactAndroid/src/androidTest/js/JSResponderTestApp.js b/ReactAndroid/src/androidTest/js/JSResponderTestApp.js index 8be0e1ede5e6f6..b46af65aa19b4f 100644 --- a/ReactAndroid/src/androidTest/js/JSResponderTestApp.js +++ b/ReactAndroid/src/androidTest/js/JSResponderTestApp.js @@ -9,12 +9,12 @@ 'use strict'; -var React = require('React'); -var StyleSheet = require('StyleSheet'); -var View = require('View'); -var Text = require('Text'); -var PanResponder = require('PanResponder'); -var ScrollView = require('ScrollView'); +const React = require('React'); +const StyleSheet = require('StyleSheet'); +const View = require('View'); +const Text = require('Text'); +const PanResponder = require('PanResponder'); +const ScrollView = require('ScrollView'); class JSResponderTestApp extends React.Component { _handleMoveShouldSetPanResponder = (e, gestureState) => { @@ -28,8 +28,8 @@ class JSResponderTestApp extends React.Component { } render() { - var views = []; - for (var i = 0; i < 100; i++) { + const views = []; + for (let i = 0; i < 100; i++) { views[i] = ( I am row {i} @@ -49,7 +49,7 @@ class JSResponderTestApp extends React.Component { } } -var styles = StyleSheet.create({ +const styles = StyleSheet.create({ container: { flex: 1, }, diff --git a/ReactAndroid/src/androidTest/js/LayoutEventsTestApp.js b/ReactAndroid/src/androidTest/js/LayoutEventsTestApp.js index c2607b7bf25c8a..b2d1d5802cae59 100644 --- a/ReactAndroid/src/androidTest/js/LayoutEventsTestApp.js +++ b/ReactAndroid/src/androidTest/js/LayoutEventsTestApp.js @@ -9,10 +9,10 @@ 'use strict'; -var React = require('React'); -var View = require('View'); +const React = require('React'); +const View = require('View'); -var RecordingModule = require('NativeModules').Recording; +const RecordingModule = require('NativeModules').Recording; const LAYOUT_SPECS = [ [10, 10, 100, 100], @@ -31,7 +31,7 @@ class LayoutEventsTestApp extends React.Component { } handleOnLayout = e => { - var layout = e.nativeEvent.layout; + const layout = e.nativeEvent.layout; RecordingModule.record( layout.x + ',' + layout.y + '-' + layout.width + 'x' + layout.height, ); diff --git a/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js b/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js index cf53a27f8cf823..7debdcd9d66d51 100644 --- a/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js +++ b/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js @@ -9,16 +9,16 @@ 'use strict'; -var BatchedBridge = require('BatchedBridge'); -var React = require('React'); -var ReactNative = require('ReactNative'); -var View = require('View'); -var StyleSheet = require('StyleSheet'); -var UIManager = require('UIManager'); +const BatchedBridge = require('BatchedBridge'); +const React = require('React'); +const ReactNative = require('ReactNative'); +const View = require('View'); +const StyleSheet = require('StyleSheet'); +const UIManager = require('UIManager'); -var assertEquals = require('Asserts').assertEquals; +const assertEquals = require('Asserts').assertEquals; -var styles = StyleSheet.create({ +const styles = StyleSheet.create({ A: { width: 500, height: 500, @@ -46,7 +46,7 @@ var styles = StyleSheet.create({ }, }); -var A, B, C, D; +let A, B, C, D; class MeasureLayoutTestApp extends React.Component { componentDidMount() { @@ -72,7 +72,7 @@ function shouldNotCallThisCallback() { assertEquals(false, true); } -var MeasureLayoutTestModule = { +const MeasureLayoutTestModule = { MeasureLayoutTestApp: MeasureLayoutTestApp, verifyMeasureOnViewA: function() { UIManager.measure(A, function(a, b, width, height, x, y) { diff --git a/ReactAndroid/src/androidTest/js/MultitouchHandlingTestAppModule.js b/ReactAndroid/src/androidTest/js/MultitouchHandlingTestAppModule.js index ea83b9b8bafb20..61e0824c1f6e53 100644 --- a/ReactAndroid/src/androidTest/js/MultitouchHandlingTestAppModule.js +++ b/ReactAndroid/src/androidTest/js/MultitouchHandlingTestAppModule.js @@ -9,11 +9,11 @@ 'use strict'; -var React = require('React'); -var Recording = require('NativeModules').Recording; -var StyleSheet = require('StyleSheet'); -var TouchEventUtils = require('fbjs/lib/TouchEventUtils'); -var View = require('View'); +const React = require('React'); +const Recording = require('NativeModules').Recording; +const StyleSheet = require('StyleSheet'); +const TouchEventUtils = require('fbjs/lib/TouchEventUtils'); +const View = require('View'); class TouchTestApp extends React.Component { handleStartShouldSetResponder = e => { @@ -57,7 +57,7 @@ class TouchTestApp extends React.Component { } } -var styles = StyleSheet.create({ +const styles = StyleSheet.create({ container: { flex: 1, }, diff --git a/ReactAndroid/src/androidTest/js/PickerAndroidTestModule.js b/ReactAndroid/src/androidTest/js/PickerAndroidTestModule.js index 3868a0bca99f33..a2b7d3bc655d13 100644 --- a/ReactAndroid/src/androidTest/js/PickerAndroidTestModule.js +++ b/ReactAndroid/src/androidTest/js/PickerAndroidTestModule.js @@ -9,15 +9,15 @@ 'use strict'; -var BatchedBridge = require('BatchedBridge'); -var React = require('React'); -var RecordingModule = require('NativeModules').PickerAndroidRecordingModule; -var Picker = require('Picker'); -var View = require('View'); +const BatchedBridge = require('BatchedBridge'); +const React = require('React'); +const RecordingModule = require('NativeModules').PickerAndroidRecordingModule; +const Picker = require('Picker'); +const View = require('View'); -var Item = Picker.Item; +const Item = Picker.Item; -var appInstance; +let appInstance; class PickerAndroidTestApp extends React.Component { state = { @@ -69,7 +69,7 @@ class PickerAndroidTestApp extends React.Component { }; } -var PickerAndroidTestModule = { +const PickerAndroidTestModule = { PickerAndroidTestApp: PickerAndroidTestApp, selectItem: function(value) { appInstance.setState({selected: value});