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

fix: add container to TypeScript types #582

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

jason0x43
Copy link
Contributor

Summary

Update the TS types for the new container property that was added to the output of render in #567.

Test plan

In a TS project using the current version of @testing-library/react-native (currently 7.1.0), try accessing container on the result of a render call. A typing error will occur because RenderAPI (the result of render) doesn't have a container property.

const bodyText = render(<BodyText>Foo</BodyText>);
expect(bodyText.container).toHaveTextContent('Foo'); // <-- will generate type error

With this PR, no error is shown.

Update the TS types for the new `container` property that was added to
the output of `render` in callstack#567.
Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants