Skip to content

getByText can't find <Text> #665

Closed as not planned
Closed as not planned
@joanca

Description

@joanca

Describe the bug

I'm trying the most basic example possible of getByText query in a component that just renders one <Text> component. It can't find the element.

Expected behavior

It finds the element.

Steps to Reproduce

Create an empty component that just renders <Text>text</Text> and test with getByText(/text/i).

Screenshots

image

Versions

  npmPackages:
    @testing-library/react-native: ^7.1.0 => 7.1.0
    react: 16.13.1 => 16.13.1
    react-native: 0.63.4 => 0.63.4
    react-test-renderer: ^16.13 => 16.14.0

Extra info

Maybe it has to do with the way I setup the project? you can find the repository here: https://gitlab.com/joanca/rn-playground

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions