Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[standards] Migrate IntegrationTests from Haste to path-based requires #24750

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion IntegrationTests/AccessibilityManagerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
const React = require('react');
const ReactNative = require('react-native');
const {View} = ReactNative;
const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
const RCTDeviceEventEmitter = require('react-native/Libraries/EventEmitter/RCTDeviceEventEmitter');
const {TestModule, AccessibilityManager} = ReactNative.NativeModules;

class AccessibilityManagerTest extends React.Component<{}> {
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/AppEventsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ReactNative = require('react-native');
const {NativeAppEventEmitter, StyleSheet, Text, View} = ReactNative;
const {TestModule} = ReactNative.NativeModules;

const deepDiffer = require('deepDiffer');
const deepDiffer = require('react-native/Libraries/Utilities/differ/deepDiffer');

const TEST_PAYLOAD = {foo: 'bar'};

Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/AsyncStorageTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ReactNative = require('react-native');
const {AsyncStorage, Text, View, StyleSheet} = ReactNative;
const {TestModule} = ReactNative.NativeModules;

const deepDiffer = require('deepDiffer');
const deepDiffer = require('react-native/Libraries/Utilities/differ/deepDiffer');

const DEBUG = false;

Expand Down
4 changes: 2 additions & 2 deletions IntegrationTests/IntegrationTestsApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

'use strict';

require('InitializeCore');
require('react-native/Libraries/Core/InitializeCore');
const React = require('react');
const ReactNative = require('react-native');
const {
Expand Down Expand Up @@ -46,7 +46,7 @@ TESTS.forEach(
);

// Modules required for integration tests
require('LoggingTestModule');
require('./LoggingTestModule');

type Test = any;

Expand Down
9 changes: 6 additions & 3 deletions IntegrationTests/LayoutEventsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ const ReactNative = require('react-native');
const {Image, LayoutAnimation, StyleSheet, Text, View} = ReactNative;
const {TestModule} = ReactNative.NativeModules;

import type {ViewStyleProp} from 'StyleSheet';
import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';

const deepDiffer = require('deepDiffer');
const deepDiffer = require('react-native/Libraries/Utilities/differ/deepDiffer');

function debug(...args) {
// console.log.apply(null, arguments);
}

import type {Layout, LayoutEvent} from 'CoreEventTypes';
import type {
Layout,
LayoutEvent,
} from 'react-native/Libraries/Types/CoreEventTypes';

type Props = $ReadOnly<{||}>;

Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/LoggingTestModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

'use strict';

const BatchedBridge = require('BatchedBridge');
const BatchedBridge = require('react-native/Libraries/BatchedBridge/BatchedBridge');

const warning = require('fbjs/lib/warning');
const invariant = require('invariant');
Expand Down
4 changes: 2 additions & 2 deletions IntegrationTests/ReactContentSizeUpdateTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

const React = require('react');
const ReactNative = require('react-native');
const RCTNativeAppEventEmitter = require('RCTNativeAppEventEmitter');
const RCTNativeAppEventEmitter = require('react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter');

const {View} = ReactNative;

const {TestModule} = ReactNative.NativeModules;
import type EmitterSubscription from 'EmitterSubscription';
import type EmitterSubscription from 'react-native/Libraries/vendor/emitter/EmitterSubscription';

const reactViewWidth = 101;
const reactViewHeight = 102;
Expand Down
4 changes: 2 additions & 2 deletions IntegrationTests/SizeFlexibilityUpdateTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

const React = require('react');
const ReactNative = require('react-native');
const RCTNativeAppEventEmitter = require('RCTNativeAppEventEmitter');
const RCTNativeAppEventEmitter = require('react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter');
const {View} = ReactNative;

const {TestModule} = ReactNative.NativeModules;
import type EmitterSubscription from 'EmitterSubscription';
import type EmitterSubscription from 'react-native/Libraries/vendor/emitter/EmitterSubscription';

const reactViewWidth = 111;
const reactViewHeight = 222;
Expand Down