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

Replace import syntax in ReactNativeTestTools #48687

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@

/* eslint-env jest */

import type {ReactTestRenderer as ReactTestRendererType} from 'react-test-renderer';

Check warning on line 13 in packages/react-native/Libraries/Utilities/ReactNativeTestTools.js

View workflow job for this annotation

GitHub Actions / test_js (20)

Requires should be sorted alphabetically

Check warning on line 13 in packages/react-native/Libraries/Utilities/ReactNativeTestTools.js

View workflow job for this annotation

GitHub Actions / test_js (18)

Requires should be sorted alphabetically

import TouchableWithoutFeedback from '../Components/Touchable/TouchableWithoutFeedback';

import React from 'react';
import ReactTestRenderer from 'react-test-renderer';

const Switch = require('../Components/Switch/Switch').default;
const TextInput = require('../Components/TextInput/TextInput');
const View = require('../Components/View/View');
const Text = require('../Text/Text');
const {VirtualizedList} = require('@react-native/virtualized-lists');
const React = require('react');
const ReactTestRenderer = require('react-test-renderer');

export type ReactTestInstance = $PropertyType<ReactTestRendererType, 'root'>;
export type Predicate = (node: ReactTestInstance) => boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9151,9 +9151,7 @@ declare module.exports: RCTLog;
`;

exports[`public API should not change unintentionally Libraries/Utilities/ReactNativeTestTools.js 1`] = `
"declare const React: $FlowFixMe;
declare const ReactTestRenderer: $FlowFixMe;
export type ReactTestInstance = $PropertyType<ReactTestRendererType, \\"root\\">;
"export type ReactTestInstance = $PropertyType<ReactTestRendererType, \\"root\\">;
export type Predicate = (node: ReactTestInstance) => boolean;
export type ReactTestRendererJSON = ReturnType<ReactTestRenderer.create.toJSON>;
declare function byClickable(): Predicate;
Expand Down
Loading