Skip to content

V7 getByText no longer find translation string #553

Closed
@dephiros

Description

@dephiros

Describe the bug

In our codebase, we implement translation with jsLingui and have code like this:

// trivial implementation of Trans

const Trans = (message) => message;

const Component = () => (
    <Text>
      <Trans>There was a problem fetching data.</Trans>
    </Text>
)

Trans would render a string.
Previously, getByText("There was a problem fetching data.") would return a match and it no longer does

Expected behavior

getByText("There was a problem fetching data.") should return a match

Steps to Reproduce

See above

Screenshots

debug() would render

        <Text>
          There was a problem fetching data.
        </Text>

Versions

  npmPackages:
    @testing-library/react-native: ^7.0.2 => 7.0.2
    react: 16.11.0 => 16.11.0
    react-native: 0.62.2 => 0.62.2
    react-test-renderer: 16.11.0 => 16.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions