Skip to content

feat: Support for @testing-library/jest-native #310

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

Conversation

mdjastrzebski
Copy link
Member

Summary

Added support for @testing-library/jest-native matchers by providing unit tests in our project, as well as documentation for setting up these matchers.

Fixes #298

Test plan

Added unit tests for @testing-library/jest-native matchers. Run yarn test

@mdjastrzebski mdjastrzebski requested a review from thymikee May 15, 2020 10:31
mdjastrzebski and others added 6 commits May 15, 2020 12:49
* Basic async findBy queries

* Refactored findBy queries to be built with makeFindQuery

* findBy queries for A11y selectors

* Custom findByTestId implementation that avoids current getByTestId issues

* Fixed prettier issue

* Updates Queries.md with findBy queries

* Trying to fix test timeout error appearing only on CI

* Code review changes

* Added typescript types & tests

* prettier did reformat some code arround

* Removed export of GetByAPI, QueryByAPI and FindByAPI interfaces in TS

* Reversed prettier run on typings

* Added overlapping pieces with `within` operator

* Small cleanup

* Update website/docs/Queries.md

* Moved async/await tests to the end of test methods

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* chore: bump eslint config to latest

* lint fix

* lint pass

* use roles directly
@mdjastrzebski mdjastrzebski requested a review from cross19xx May 15, 2020 12:21
Copy link
Contributor

@cross19xx cross19xx left a comment

Choose a reason for hiding this comment

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

Any idea how to remove the multiple $FlowFixme comments?

@cross19xx cross19xx changed the title Support for @testing-library/jest-native feat: Support for @testing-library/jest-native May 17, 2020
@mdjastrzebski
Copy link
Member Author

@cross19xx This seems to be actually @testing-library/jest-native issue with incomplete flow typings, as they are inferred by flow, and not exported by library. So the code works correctly in runtime, but yarn flow-check complains.

@thymikee thymikee merged commit 414f870 into callstack:master May 18, 2020
@mdjastrzebski mdjastrzebski deleted the feature/testing-library-jest-native-integration branch May 19, 2020 12:41
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.

Make sure we support @testing-library/jest-native
3 participants