mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Migrate "androidTest" JS from Haste to path-based requires (#24813)
Summary: The files in `ReactAndroid/src/androidTest/js` use Haste names; this commit migrates them to use path-based imports. This helps us move RN towards standard path-based requires. All the requires in `androidTest` have been rewritten to use relative requires. [General] [Changed] - Migrate "androidTest" JS from Haste to path-based requires Pull Request resolved: https://github.com/facebook/react-native/pull/24813 Differential Revision: D15318108 Pulled By: cpojer fbshipit-source-id: dddc68f992b8dea48afb01fd4481bd5b846231ca
This commit is contained in:
committed by
Facebook Github Bot
parent
916186a7e6
commit
cd9adda651
@@ -1,21 +1,25 @@
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @providesModule AnimatedTransformTestModule
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var BatchedBridge = require('BatchedBridge');
|
||||
var React = require('React');
|
||||
var StyleSheet = require('StyleSheet');
|
||||
var View = require('View');
|
||||
var TouchableOpacity = require('TouchableOpacity');
|
||||
var Text = require('Text');
|
||||
var RecordingModule = require('NativeModules').Recording;
|
||||
const React = require('react');
|
||||
const {
|
||||
NativeModules,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} = require('react-native');
|
||||
const BatchedBridge = require('react-native/Libraries/BatchedBridge/BatchedBridge');
|
||||
|
||||
const {Recording: RecordingModule} = NativeModules;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
base: {
|
||||
@@ -62,7 +66,7 @@ class AnimatedTransformTestApp extends React.Component {
|
||||
onPress={this.toggle}
|
||||
testID="TouchableOpacity"
|
||||
style={[styles.base, this.state.flag ? styles.transformed : null]}>
|
||||
<Text>TouchableOpacity</Text>
|
||||
<Text>TouchableOpacity</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
);
|
||||
@@ -75,7 +79,7 @@ var AnimatedTransformTestModule = {
|
||||
|
||||
BatchedBridge.registerCallableModule(
|
||||
'AnimatedTransformTestModule',
|
||||
AnimatedTransformTestModule
|
||||
AnimatedTransformTestModule,
|
||||
);
|
||||
|
||||
module.exports = AnimatedTransformTestModule;
|
||||
|
||||
Reference in New Issue
Block a user