{"repo":"testing-library/jest-native","free":true,"listed":false,"github":"https://github.com/testing-library/jest-native","clone":"git clone https://github.com/testing-library/jest-native.git","description":"🦅 Custom jest matchers to test the state of React Native","language":"TypeScript","stars":440,"topics":["react-native","reactjs","testing","jest","javascript","custom-jest-matchers","hacktoberfest"],"license":"MIT","category":"mobile-apps","readme_excerpt":"[!CAUTION] This package is deprecated and is no longer actively maintained. We encourage you to migrate to React Native Testing Library, v12.4 or later, which includes modern built-in Jest matchers based on the matchers for this repository. The migration process should be relatively straightforward, we have a migration guide available. jest-native Custom jest matchers to test the state of React Native. Table of Contents - The problem - This solution - Compatibility - Installation - Usage - Extending Jest matchers - TypeScript support - Matchers - toBeDisabled - toBeEnabled - toBeEmptyElement - toContainElement - toBeOnTheScreen - toHaveProp - toHaveTextContent - toHaveStyle - toBeVisible - toHaveAccessibilityState - toHaveAccessibilityValue - Inspiration - Other solutions - Contributors The problem You want to use jest to write tests that assert various things about the state of a React Native app. As part of that goal, you want to avoid all the repetitive patterns that arise in doing so like checking for a native element's props, its text content, its styles, and more. This solution The jest-native library provides a set of custom jest matchers that you can use to extend jest. These will make your tests more declarative, clear to read and to maintain. Compatibility These matchers should, for the most part, be agnostic enough to work with any React Native testing utilities, but they are primarily intended to be used with React Native Testing Library. Any issues raised with ex","default_branch":null,"files":null,"tree":[],"storefront":"/r/testing-library","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/testing-library/jest-native/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}