This repository was archived by the owner on Jul 30, 2020. It is now read-only.
This repository was archived by the owner on Jul 30, 2020. It is now read-only.
getByText
type might be wrong #45
Closed
Description
expo
:native-testing-library
version: 4.0.7jest-preset
: jest-expo/jest-preset.js + @testing-library/react-native/jest-presetreact-native
version: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gznode
version: v12.5.0
Relevant code or config:
getByText(DISPLAY_STRINGS.page01.body, {
// @ts-ignore
normalizer: (string: string) => string.trim()
});
What you did:
Tried to add options to getByText
What happened:
Argument of type '{ normalizer: (string: string) => string; }' is not assignable to parameter of type 'WaitForElementOptions'.
Object literal may only specify known properties, and 'normalizer' does not exist in type 'WaitForElementOptions'.ts(2345)
Reproduction:
Problem description:
This behavior doesn't match documentation
Suggested solution:
Update type, essentially,
- WaitForElementOptions
+ SelectorMatcherOptions
Can you help us fix this issue by submitting a pull request?
I am able to submit a PR with the change