Skip to content

Commit 315afca

Browse files
chore: reformat imports (#1742)
1 parent 17ccd9e commit 315afca

File tree

120 files changed

+123
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+123
-4
lines changed

eslint.config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default [
2323
'simple-import-sort/imports': [
2424
'error',
2525
{
26-
groups: [['^\\u0000', '^react', '^@?\\w', '^', '^\\.']],
26+
groups: [['^\\u0000', '^react', '^@?\\w', '^'], ['^\\.']],
2727
},
2828
],
2929
},

src/__tests__/act.test.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react';
22
import { Text } from 'react-native';
3-
import { act, fireEvent, render, screen } from '../';
3+
4+
import { act, fireEvent, render, screen } from '..';
45

56
type UseEffectProps = { callback(): void };
67
const UseEffect = ({ callback }: UseEffectProps) => {

src/__tests__/auto-cleanup.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { View } from 'react-native';
3+
34
import { render } from '..';
45

56
let isMounted = false;

src/__tests__/cleanup.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { View } from 'react-native';
3+
34
import { cleanup, render } from '../pure';
45

56
class Test extends React.Component<{ onUnmount: () => void }> {

src/__tests__/fire-event-textInput.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import type { TextInputProps } from 'react-native';
33
import { Text, TextInput } from 'react-native';
4+
45
import { fireEvent, render, screen } from '..';
56

67
function WrappedTextInput(props: TextInputProps) {

src/__tests__/fire-event.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
TouchableOpacity,
99
View,
1010
} from 'react-native';
11+
1112
import { fireEvent, render, screen } from '..';
1213

1314
type OnPressComponentProps = {

src/__tests__/host-component-names.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Image, Modal, ScrollView, Switch, Text, TextInput } from 'react-native';
3+
34
import { render, screen } from '..';
45
import {
56
isHostImage,

src/__tests__/host-text-nesting.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Pressable, Text, View } from 'react-native';
3+
34
import { render, screen, within } from '../pure';
45

56
/**

src/__tests__/questionsBoard.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Pressable, ScrollView, Text, TextInput, View } from 'react-native';
3+
34
import { render, screen, userEvent } from '..';
45

56
type QuestionsBoardProps = {

src/__tests__/react-native-animated.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react';
22
import type { ViewStyle } from 'react-native';
33
import { Animated } from 'react-native';
4+
45
import { act, render, screen } from '..';
56

67
type AnimatedViewProps = {

src/__tests__/react-native-api.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { FlatList, Image, Modal, ScrollView, Switch, Text, TextInput, View } from 'react-native';
3+
34
import { render, screen } from '..';
45

56
/**

src/__tests__/render-debug.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Pressable, Text, TextInput, View } from 'react-native';
3+
34
import { configure, fireEvent, render, screen } from '..';
45
import { logger } from '../helpers/logger';
56

src/__tests__/render-hook.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { ReactNode } from 'react';
22
import React from 'react';
33
import TestRenderer from 'react-test-renderer';
4+
45
import { renderHook } from '../pure';
56

67
test('gives committed result', () => {

src/__tests__/render-string-validation.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Pressable, Text, View } from 'react-native';
3+
34
import { fireEvent, render, screen } from '..';
45

56
// eslint-disable-next-line no-console

src/__tests__/render.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Pressable, Text, TextInput, View } from 'react-native';
3+
34
import type { RenderAPI } from '..';
45
import { fireEvent, render, screen } from '..';
56

src/__tests__/screen.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Text, View } from 'react-native';
3+
34
import { render, screen } from '..';
45

56
test('screen has the same queries as render result', () => {

src/__tests__/wait-for-element-to-be-removed.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useState } from 'react';
22
import { Text, TouchableOpacity, View } from 'react-native';
3+
34
import { fireEvent, render, screen, waitForElementToBeRemoved } from '..';
45

56
const TestSetup = ({ shouldUseDelay = true }) => {

src/__tests__/wait-for.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Pressable, Text, TouchableOpacity, View } from 'react-native';
3+
34
import { configure, fireEvent, render, screen, waitFor } from '..';
45

56
class Banana extends React.Component<any> {

src/__tests__/within.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Text, TextInput, View } from 'react-native';
3+
34
import { getQueriesForElement, render, within } from '..';
45

56
test('within() exposes basic queries', async () => {

src/fire-event.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type {
66
ViewProps,
77
} from 'react-native';
88
import type { ReactTestInstance } from 'react-test-renderer';
9+
910
import act from './act';
1011
import { isElementMounted, isHostElement } from './helpers/component-tree';
1112
import { isHostScrollView, isHostTextInput } from './helpers/host-component-names';

src/helpers/__tests__/accessiblity.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import { Pressable, Switch, Text, TextInput, TouchableOpacity, View } from 'react-native';
3+
34
import { isHiddenFromAccessibility, isInaccessible, render, screen } from '../..';
45
import { computeAriaLabel, isAccessibilityElement } from '../accessibility';
56

src/helpers/__tests__/component-tree.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import { Text, TextInput, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45
import {
56
getHostChildren,

src/helpers/__tests__/format-element.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Text, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45
import { formatElement } from '../format-element';
56

src/helpers/__tests__/include-hidden-elements.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import { View } from 'react-native';
3+
34
import { configure, render, screen } from '../..';
45

56
test('includeHiddenElements query option takes priority over hidden option and global config', () => {

src/helpers/__tests__/text-content.test.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react';
22
import { Text } from 'react-native';
3-
import { render, screen } from '../../';
3+
4+
import { render, screen } from '../..';
45
import { getTextContent } from '../text-content';
56

67
test('getTextContent with simple content', () => {

src/helpers/__tests__/text-input.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { TextInput, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45
import { getTextInputValue, isEditableTextInput } from '../text-input';
56

src/helpers/accessibility.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { AccessibilityRole, AccessibilityState, AccessibilityValue, Role } from 'react-native';
22
import { StyleSheet } from 'react-native';
33
import type { ReactTestInstance } from 'react-test-renderer';
4+
45
import { getHostSiblings, getUnsafeRootElement, isHostElement } from './component-tree';
56
import { findAll } from './find-all';
67
import { isHostImage, isHostSwitch, isHostText, isHostTextInput } from './host-component-names';

src/helpers/component-tree.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactTestInstance } from 'react-test-renderer';
2+
23
import { screen } from '../screen';
34
/**
45
* ReactTestInstance referring to host element.

src/helpers/debug.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactTestRendererJSON } from 'react-test-renderer';
2+
23
import type { FormatElementOptions } from './format-element';
34
import { formatJson } from './format-element';
45
import { logger } from './logger';

src/helpers/find-all.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactTestInstance } from 'react-test-renderer';
2+
23
import { getConfig } from '../config';
34
import { isHiddenFromAccessibility } from './accessibility';
45
import type { HostTestInstance } from './component-tree';

src/helpers/format-element.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { ReactTestInstance, ReactTestRendererJSON } from 'react-test-renderer';
22
import type { NewPlugin } from 'pretty-format';
33
import prettyFormat, { plugins } from 'pretty-format';
4+
45
import type { MapPropsFunction } from './map-props';
56
import { defaultMapProps } from './map-props';
67

src/helpers/host-component-names.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactTestInstance } from 'react-test-renderer';
2+
23
import type { HostTestInstance } from './component-tree';
34

45
const HOST_TEXT_NAMES = ['Text', 'RCTText'];

src/helpers/map-props.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { ViewStyle } from 'react-native';
22
import { StyleSheet } from 'react-native';
3+
34
import { removeUndefinedKeys } from './object';
45

56
export type MapPropsFunction = (props: Record<string, unknown>) => Record<string, unknown>;

src/helpers/matchers/match-accessibility-state.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactTestInstance } from 'react-test-renderer';
2+
23
import {
34
computeAriaBusy,
45
computeAriaChecked,

src/helpers/matchers/match-accessibility-value.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactTestInstance } from 'react-test-renderer';
2+
23
import type { TextMatch } from '../../matches';
34
import { computeAriaValue } from '../accessibility';
45
import { matchStringProp } from './match-string-prop';

src/helpers/matchers/match-label-text.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactTestInstance } from 'react-test-renderer';
2+
23
import type { TextMatch, TextMatchOptions } from '../../matches';
34
import { matches } from '../../matches';
45
import { computeAriaLabel } from '../accessibility';

src/helpers/matchers/match-text-content.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactTestInstance } from 'react-test-renderer';
2+
23
import type { TextMatch, TextMatchOptions } from '../../matches';
34
import { matches } from '../../matches';
45
import { getTextContent } from '../text-content';

src/helpers/pointer-events.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactTestInstance } from 'react-test-renderer';
2+
23
import { getHostParent } from './component-tree';
34

45
/**

src/helpers/text-input.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactTestInstance } from 'react-test-renderer';
2+
23
import { nativeState } from '../native-state';
34
import { isHostTextInput } from './host-component-names';
45

src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './matchers/extend-expect';
2+
23
import { getIsReactActEnvironment, setReactActEnvironment } from './act';
34
import { flushMicroTasks } from './flush-micro-tasks';
45
import { cleanup } from './pure';

src/matchers/__tests__/to-be-busy.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
test('toBeBusy() basic case', () => {

src/matchers/__tests__/to-be-checked.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import { type AccessibilityRole, Switch, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
function renderViewsWithRole(role: AccessibilityRole) {

src/matchers/__tests__/to-be-disabled.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
TouchableWithoutFeedback,
1111
View,
1212
} from 'react-native';
13+
1314
import { render, screen } from '../..';
1415

1516
test('toBeDisabled()/toBeEnabled() supports basic case', () => {

src/matchers/__tests__/to-be-empty-element.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import { View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
// eslint-disable-next-line @typescript-eslint/no-unused-vars

src/matchers/__tests__/to-be-expanded.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
test('toBeExpanded() basic case', () => {

src/matchers/__tests__/to-be-on-the-screen.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Text, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
test('toBeOnTheScreen() example test', () => {

src/matchers/__tests__/to-be-partially-checked.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import { type AccessibilityRole, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
function renderViewsWithRole(role: AccessibilityRole) {

src/matchers/__tests__/to-be-selected.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
test('toBeSelected() basic case', () => {

src/matchers/__tests__/to-be-visible.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Modal, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
test('toBeVisible() on empty view', () => {

src/matchers/__tests__/to-contain-element.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
test('toContainElement() supports basic case', () => {

src/matchers/__tests__/to-have-accessibility-value.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
describe('toHaveAccessibilityValue', () => {

src/matchers/__tests__/to-have-accessible-name.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Image, Text, TextInput, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
test('toHaveAccessibleName() handles view with "accessibilityLabel" prop', () => {

src/matchers/__tests__/to-have-display-value.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { TextInput, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
test('toHaveDisplayValue() example test', () => {

src/matchers/__tests__/to-have-prop.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import { Text, TextInput, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
test('toHaveProp() basic case', () => {

src/matchers/__tests__/to-have-style.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import { Pressable, StyleSheet, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
const styles = StyleSheet.create({

src/matchers/__tests__/to-have-text-content.test.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
22
import { Text, View } from 'react-native';
3+
34
import { render, screen } from '../..';
45

56
test('toHaveTextContent() example test', () => {

0 commit comments

Comments
 (0)