Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: callstack/react-native-testing-library
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v12.3.0
Choose a base ref
...
head repository: callstack/react-native-testing-library
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v12.3.1
Choose a head ref
  • 16 commits
  • 49 files changed
  • 10 contributors

Commits on Sep 7, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8373d6a View commit details

Commits on Sep 8, 2023

  1. feat: implement toBeSelected matcher (#1488)

    * feat: implement toBeSelected
    
    * refactor: tweaks
    
    * refactor: tweak tests
    
    * refactor: finishing touches
    
    ---------
    
    Co-authored-by: Maciej Jastrzębski <mdjastrzebski@gmail.com>
    AntoineThibi and mdjastrzebski authored Sep 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1592d35 View commit details

Commits on Sep 12, 2023

  1. feat: toBeBusy() matcher (#1493)

    * feat: create always passing toBeBusy() matcher
    
    * test: prepare toBeBusy() tests
    
    * feat: implement toBeBusy() passing condition
    
    * feat: implement error message
    
    * test: update error message snapshots to correct format
    
    * refactor: use screen variable
    
    * refactor: tweaks
    
    * refactor: cleanup
    
    * refactor:  clean up
    
    * refactor: finishing touches
    
    ---------
    
    Co-authored-by: Maciej Jastrzębski <mdjastrzebski@gmail.com>
    Hugo Duprat and mdjastrzebski authored Sep 12, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    701433c View commit details
  2. feat: toHaveStyle matcher (#1487)

    * feat: implement toHaveStyle with tests
    
    * refactor: tweaks and cleanup
    
    ---------
    
    Co-authored-by: Marcin Kornek <7931279+marcinkornek@users.noreply.github.com>
    Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
    3 people authored Sep 12, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3b9c4da View commit details

Commits on Sep 13, 2023

  1. feat: user event scroll (#1445)

    * feat: setup dummy scroll endpoint
    
    * chore: use ScrollEventBuilder
    
    * chore: enhance API endpoint with parameters
    
    * chore: emit multiple scroll events
    
    * fix: intermediate steps offset values
    
    * feat: momentum scroll
    
    * chore: add scroll to userEvent
    
    * feat: scrollToTop
    
    * feat: remember scroll position for element
    
    * fix: setting and getting scroll state
    
    * chore: validate host component type
    
    * chore: validate and emit intermediate callbacks in scrollToTop
    
    * chore: fix ts
    
    * refactor: rename scroll to scrollTo
    
    * refactor: y & x scrollTo params
    
    * refactor: refactor y, x params to support explicit steps
    
    * chore: fix typecheck
    
    * refactor: improve typing
    
    * refactor: momentumY, momentumX options
    
    * docs: initial docs for `scrollTo`
    
    * refactor: descope `scrollToTop` variant
    
    * docs: tweaks
    
    * refactor: improve TS typing by separating vertical/horizontal scroll
    
    * refactor: wrap scroll event in nativeEvent wrapper
    
    * refactor: clean up implementation
    
    * chore: add FlatList tests
    
    * refactor: remove explicit steps
    
    * refactor: introduce inertial interpolator for momentum scroll
    
    * docs: update docs
    
    * chore: update snapshots
    
    * refactor: code review changes
    
    * feat: validate scroll direction
    
    * docs: tweaks
    
    * docs: tweak
    
    * refactor: add more tests to improve code cov
    
    * refactor: improve errors
    
    * refactor: code review tweaks
    
    * refactor: add wait calls
    
    * refactor: tweaks, tweaks, tweaks
    
    * refactor: final tweaks
    
    ---------
    
    Co-authored-by: Maciej Jastrzębski <mdjastrzebski@gmail.com>
    siepra and mdjastrzebski authored Sep 13, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a7ea95d View commit details

Commits on Sep 15, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a016062 View commit details

Commits on Sep 18, 2023

  1. chore: update deps 2023-09-18 (#1499)

    * chore: upgrade example/basic deps
    
    * chore: update some deps
    
    * chore: upgrade other deps
    
    * chore: fix lint
    
    * chore: yarn upgrade (partial)
    
    * chore: yarn upgrade (partial 2)
    
    * chore: yarn upgrade (partial)
    
    * chore: yarn upgrade (partial)
    
    * chore: yarn upgrade (partial)
    
    * chore: yarn upgrade react-native
    
    * chore: upgrade rest (ex react-test-renderer)
    mdjastrzebski authored Sep 18, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    08e4d02 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7a12847 View commit details
  3. docs: note required RNTL version for user-event in user-event.md (#1494)

    * docs: note required RNTL version for user-event in user-event.md
    
    * chore: tweak wording
    
    * chore: tweak
    
    * chore: tweaks
    
    ---------
    
    Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
    meatnordrink and mdjastrzebski authored Sep 18, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f538029 View commit details

Commits on Sep 19, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d36137b View commit details
  2. feat: toContainElement matcher (#1495)

    * feat: add toContainElement matcher
    
    * chore: replace printElement with formatElement
    
    * chore: mimic jest-dom instead of jest-native
    
    * fix: checking host element
    
    * test: passing null as argument
    
    * chore: rename basic test case
    
    * test: negative case
    
    * test: on null elements
    
    * fix: validating host container and element
    
    * refactor: code review changes
    
    * refactor: tweaks
    
    * refactors: cleanup
    
    ---------
    
    Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
    siepra and mdjastrzebski authored Sep 19, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d898a9d View commit details
  3. feat: toBeExpanded matcher (#1497)

    * feat: toBeExpanded matcher
    
    * feat: toBeCollapsed matcher
    
    * chore: shorten syntax for isElementCollapsed check
    
    * refactor: clean up
    
    ---------
    
    Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
    siepra and mdjastrzebski authored Sep 19, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a9f32a6 View commit details

Commits on Oct 12, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    32dca59 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3be9f3b View commit details

Commits on Oct 23, 2023

  1. Fix: switch IS_REACT_ACT_ENVIRONMENT in userEvent (#1491)

    * fix: use act in wait util
    
    * refactor: remove useless usage of act in press implem
    
    * refactor: make test fail by checking console.error is not called
    
    * refactor: extract async wrapper from waitFor implem
    
    * feat: use asyncWrapper for userEvent to prevent act warnings
    
    * refactor: add comment making test on act environment more explicit
    
    * refactor: move asyncWrapper to helper folder cause its not direclty tied to userevent
    
    * refactor: add comment in asyncWrapper
    
    * refactor: move UE `act` test to UE `press` tests
    
    * refactor: tweaks
    
    * refactor: naming tweaks
    
    * chore: revert unnecessary filename change
    
    * chore: exclude code cov for React <= 17
    
    * chore: disable codecov for wrap-async
    
    ---------
    
    Co-authored-by: pierrezimmermann <pierrez@nam.tech>
    Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
    3 people authored Oct 23, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    328466d View commit details

Commits on Oct 24, 2023

  1. v12.3.1

    mdjastrzebski committed Oct 24, 2023
    Copy the full SHA
    798100b View commit details
Showing with 4,053 additions and 2,507 deletions.
  1. +1 −1 .github/workflows/example-apps.yml
  2. +2 −16 .github/workflows/main.yml
  3. +5 −5 examples/basic/package.json
  4. +6 −0 experiments-app/src/experiments.ts
  5. +80 −0 experiments-app/src/screens/Accessibility.tsx
  6. +7 −7 experiments-rtl/src/app/__tests__/click.test.tsx
  7. +21 −19 package.json
  8. +8 −1 src/__tests__/config.test.ts
  9. +9 −6 src/__tests__/host-component-names.test.tsx
  10. +1 −0 src/config.ts
  11. +28 −0 src/helpers/accessiblity.ts
  12. +13 −1 src/helpers/host-component-names.tsx
  13. +10 −0 src/helpers/object.ts
  14. +43 −0 src/helpers/wrap-async.ts
  15. +96 −0 src/matchers/__tests__/to-be-busy.test.tsx
  16. +97 −0 src/matchers/__tests__/to-be-collapsed.test.tsx
  17. +96 −0 src/matchers/__tests__/to-be-expanded.test.tsx
  18. +96 −0 src/matchers/__tests__/to-be-selected.test.tsx
  19. +141 −0 src/matchers/__tests__/to-contain-element.test.tsx
  20. +175 −0 src/matchers/__tests__/to-have-style.test.tsx
  21. +9 −0 src/matchers/extend-expect.d.ts
  22. +12 −0 src/matchers/extend-expect.ts
  23. +7 −1 src/matchers/index.tsx
  24. +28 −0 src/matchers/to-be-busy.tsx
  25. +28 −0 src/matchers/to-be-collapsed.tsx
  26. +28 −0 src/matchers/to-be-expanded.tsx
  27. +24 −0 src/matchers/to-be-selected.ts
  28. +38 −0 src/matchers/to-contain-element.tsx
  29. +86 −0 src/matchers/to-have-style.tsx
  30. +1 −1 src/test-utils/events.ts
  31. +2 −0 src/user-event/event-builder/index.ts
  32. +32 −0 src/user-event/event-builder/scroll-view.ts
  33. +3 −0 src/user-event/index.ts
  34. +28 −0 src/user-event/press/__tests__/press.test.tsx
  35. +20 −23 src/user-event/press/press.ts
  36. +161 −0 src/user-event/scroll/__tests__/__snapshots__/scrollTo-flatList.tsx.snap
  37. +161 −0 src/user-event/scroll/__tests__/__snapshots__/scrollTo.test.tsx.snap
  38. +70 −0 src/user-event/scroll/__tests__/scrollTo-flatList.tsx
  39. +211 −0 src/user-event/scroll/__tests__/scrollTo.test.tsx
  40. +1 −0 src/user-event/scroll/index.ts
  41. +175 −0 src/user-event/scroll/scrollTo.ts
  42. +17 −0 src/user-event/scroll/state.ts
  43. +79 −0 src/user-event/scroll/utils.ts
  44. +48 −6 src/user-event/setup/setup.ts
  45. +3 −29 src/waitFor.ts
  46. +1 −1 website/docker/Dockerfile
  47. +39 −1 website/docs/Troubleshooting.md
  48. +62 −0 website/docs/UserEvent.md
  49. +1,744 −2,389 yarn.lock
2 changes: 1 addition & 1 deletion .github/workflows/example-apps.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ jobs:
test-example:
strategy:
matrix:
node: [14, 16, 18]
node: [18, 20]
example: [basic, redux, react-navigation]
name: Test Example
runs-on: ubuntu-latest
18 changes: 2 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -61,34 +61,20 @@ jobs:
test:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Test React 18
name: Test
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps

- name: Test React 18
- name: Test
run: yarn test:ci

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3

test-react-17:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Test React 17
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js and deps
uses: ./.github/actions/setup-deps

- name: Test React 17
run: yarn test:ci:react:17

test-website:
runs-on: ubuntu-latest
name: Test Website
10 changes: 5 additions & 5 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
@@ -14,17 +14,17 @@
"expo-status-bar": "~1.6.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.72.3",
"react-native": "0.72.4",
"react-native-web": "~0.19.6"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@testing-library/jest-native": "^5.4.2",
"@testing-library/react-native": "^12.2.1",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "^12.3.0",
"@types/react": "~18.2.14",
"jest": "^29.3.0",
"jest": "^29.7.0",
"react-test-renderer": "18.2.0",
"typescript": "^5.1.3"
"typescript": "^5.2.2"
},
"private": true
}
6 changes: 6 additions & 0 deletions experiments-app/src/experiments.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AccessibilityScreen } from './screens/Accessibility';
import { TextInputEventPropagation } from './screens/TextInputEventPropagation';
import { TextInputEvents } from './screens/TextInputEvents';
import { ScrollViewEvents } from './screens/ScrollViewEvents';
@@ -7,6 +8,11 @@ import { SectionListEvents } from './screens/SectionListEvents';
export type Experiment = (typeof experiments)[number];

export const experiments = [
{
key: 'Accessibility',
title: 'Accessibility',
component: AccessibilityScreen,
},
{
key: 'TextInputEvents',
title: 'TextInput Events',
80 changes: 80 additions & 0 deletions experiments-app/src/screens/Accessibility.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import * as React from 'react';
import { StyleSheet, View, Text, ScrollView, TextInput } from 'react-native';

export function AccessibilityScreen() {
return (
<ScrollView style={styles.container}>
<View style={styles.view}>
<Text accessible={false}>{'<View />'}</Text>
</View>
<View accessible style={styles.view}>
<Text accessible={false}>{'<View accessible />'}</Text>
</View>
<View role="button" style={styles.view}>
<Text accessible={false}>{'<View role="button" />'}</Text>
</View>
<View accessible role="button" style={styles.view}>
<Text accessible={false}>{'<View accessible role="button" />'}</Text>
</View>
<View accessible role="slider" style={styles.view}>
<Text accessible={false}>{'<View accessible role="slider" />'}</Text>
</View>
<View accessible role="none" style={styles.view}>
<Text accessible={false}>{'<View accessible role="none" />'}</Text>
</View>

<Text style={styles.text}>{'<Text />'}</Text>
<Text accessible={false} style={styles.text}>
{'<Text accessible={false} />'}
</Text>
<Text role="none" style={styles.text}>
{'<Text role="none" />'}
</Text>

<TextInput style={styles.textInput} value="<TextInput />" />
<TextInput
editable={false}
style={styles.textInput}
value="<TextInput editable={false} />"
/>
<TextInput
accessibilityRole="search"
style={styles.textInput}
value="<TextInput accessibilityRole='search' />"
/>
<TextInput
role="searchbox"
style={styles.textInput}
value="<TextInput role='search' />"
/>
<TextInput
role="none"
style={styles.textInput}
value="<TextInput role='none' />"
/>
<TextInput
accessible={false}
style={styles.textInput}
value="<TextInput accessible={false} />"
/>
</ScrollView>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
},
view: {
padding: 20,
backgroundColor: 'grey',
},
text: {
padding: 20,
backgroundColor: '#b1f2ff',
},
textInput: {
padding: 20,
backgroundColor: '#fbebd8',
},
});
14 changes: 7 additions & 7 deletions experiments-rtl/src/app/__tests__/click.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from "react";
import { render, screen, fireEvent } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import * as React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

test("userEvent.click()", async () => {
test('userEvent.click()', async () => {
const handleClick = jest.fn();

render(
@@ -11,12 +11,12 @@ test("userEvent.click()", async () => {
</button>
);

const button = screen.getByText("Click");
const button = screen.getByText('Click');
await userEvent.click(button);
expect(handleClick).toHaveBeenCalledTimes(1);
});

test("fireEvent.click()", () => {
test('fireEvent.click()', () => {
const handleClick = jest.fn();

render(
@@ -25,7 +25,7 @@ test("fireEvent.click()", () => {
</button>
);

const button = screen.getByText("Click");
const button = screen.getByText('Click');
fireEvent.click(button);
expect(handleClick).toHaveBeenCalledTimes(1);
});
40 changes: 21 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@testing-library/react-native",
"version": "12.3.0",
"version": "12.3.1",
"description": "Simple and complete React Native testing utilities that encourage good testing practices.",
"main": "build/index.js",
"types": "build/index.d.ts",
@@ -32,34 +32,35 @@
"dont-cleanup-after-each.js"
],
"devDependencies": {
"@babel/cli": "^7.19.3",
"@babel/core": "^7.20.2",
"@babel/plugin-transform-flow-strip-types": "^7.19.0",
"@babel/preset-env": "^7.20.2",
"@babel/preset-flow": "^7.18.6",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@babel/cli": "^7.22.15",
"@babel/core": "^7.22.20",
"@babel/plugin-transform-flow-strip-types": "^7.22.5",
"@babel/preset-env": "^7.22.20",
"@babel/preset-flow": "^7.22.15",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@callstack/eslint-config": "^13.0.1",
"@relmify/jest-serializer-strip-ansi": "^1.0.2",
"@types/jest": "^29.2.3",
"@types/react": "^18.2.15",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.4.0",
"@types/jest": "^29.5.5",
"@types/react": "^18.2.21",
"@types/react-test-renderer": "^18.0.2",
"babel-jest": "^29.7.0",
"dedent": "^1.1.0",
"del-cli": "^5.0.0",
"eslint": "^8.21.0",
"eslint-plugin-flowtype": "^8.0.3",
"flow-bin": "~0.170.0",
"flow-copy-source": "^2.0.9",
"jest": "^29.4.0",
"jest": "^29.7.0",
"react": "18.2.0",
"react-native": "0.71.4",
"react-native": "0.72.4",
"react-test-renderer": "18.2.0",
"strip-ansi": "^6.0.0",
"typescript": "^5.0.2"
"strip-ansi": "^6.0.1",
"typescript": "^5.2.2"
},
"dependencies": {
"jest-matcher-utils": "^29.6.2",
"pretty-format": "^29.6.2",
"jest-matcher-utils": "^29.7.0",
"pretty-format": "^29.7.0",
"redent": "^3.0.0"
},
"peerDependencies": {
@@ -77,11 +78,12 @@
"clean": "del build",
"test": "jest",
"test:ci": "jest --maxWorkers=2 --collectCoverage=true --coverage-provider=v8",
"test:ci:react:17": "scripts/test_react_17",
"test:react-17": "scripts/test_react_17",
"typecheck": "tsc",
"flow": "flow",
"copy-flowtypes": "cp typings/index.flow.js build",
"lint": "eslint src --cache",
"validate": "yarn lint && yarn typecheck && yarn test",
"prepublish": "yarn build",
"build:js": "babel src --out-dir build --extensions \".js,.ts,.jsx,.tsx\" --source-maps --ignore \"**/__tests__/**\"",
"build:js:watch": "yarn build:js --watch",
9 changes: 8 additions & 1 deletion src/__tests__/config.test.ts
Original file line number Diff line number Diff line change
@@ -35,12 +35,19 @@ test('resetToDefaults() resets config to defaults', () => {

test('resetToDefaults() resets internal config to defaults', () => {
configureInternal({
hostComponentNames: { text: 'A', textInput: 'A', switch: 'A', modal: 'A' },
hostComponentNames: {
text: 'A',
textInput: 'A',
switch: 'A',
scrollView: 'A',
modal: 'A',
},
});
expect(getConfig().hostComponentNames).toEqual({
text: 'A',
textInput: 'A',
switch: 'A',
scrollView: 'A',
modal: 'A',
});

15 changes: 9 additions & 6 deletions src/__tests__/host-component-names.test.tsx
Original file line number Diff line number Diff line change
@@ -8,19 +8,14 @@ import {
} from '../helpers/host-component-names';
import { act, render } from '..';

const mockCreate = jest.spyOn(TestRenderer, 'create') as jest.Mock;

beforeEach(() => {
mockCreate.mockReset();
});

describe('getHostComponentNames', () => {
test('returns host component names from internal config', () => {
configureInternal({
hostComponentNames: {
text: 'banana',
textInput: 'banana',
switch: 'banana',
scrollView: 'banana',
modal: 'banana',
},
});
@@ -29,6 +24,7 @@ describe('getHostComponentNames', () => {
text: 'banana',
textInput: 'banana',
switch: 'banana',
scrollView: 'banana',
modal: 'banana',
});
});
@@ -42,6 +38,7 @@ describe('getHostComponentNames', () => {
text: 'Text',
textInput: 'TextInput',
switch: 'RCTSwitch',
scrollView: 'RCTScrollView',
modal: 'Modal',
});
expect(getConfig().hostComponentNames).toBe(hostComponentNames);
@@ -71,6 +68,7 @@ describe('configureHostComponentNamesIfNeeded', () => {
text: 'Text',
textInput: 'TextInput',
switch: 'RCTSwitch',
scrollView: 'RCTScrollView',
modal: 'Modal',
});
});
@@ -81,6 +79,7 @@ describe('configureHostComponentNamesIfNeeded', () => {
text: 'banana',
textInput: 'banana',
switch: 'banana',
scrollView: 'banana',
modal: 'banana',
},
});
@@ -91,11 +90,13 @@ describe('configureHostComponentNamesIfNeeded', () => {
text: 'banana',
textInput: 'banana',
switch: 'banana',
scrollView: 'banana',
modal: 'banana',
});
});

test('throw an error when autodetection fails', () => {
const mockCreate = jest.spyOn(TestRenderer, 'create') as jest.Mock;
const renderer = TestRenderer.create(<View />);

mockCreate.mockReturnValue({
@@ -111,5 +112,7 @@ describe('configureHostComponentNamesIfNeeded', () => {
There seems to be an issue with your configuration that prevents React Native Testing Library from working correctly.
Please check if you are using compatible versions of React Native and React Native Testing Library."
`);

mockCreate.mockReset();
});
});
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ export type HostComponentNames = {
text: string;
textInput: string;
switch: string;
scrollView: string;
modal: string;
};

Loading