* capture global timers, use them in waitFor, tests+
* use real timers in flushMicroTasks
* test to show changes with modern timer mocks
* use enum-like object for timer modes
* fix tests
* remove default timer mode, add flow types
export other timer helpers, adjust tests and docs
* base waitFor on RTL implementation
* [jest] Capture and restore global promise
* [waitFor] Simulate intervals when using fake timers
* [tests] Fix waitForElementToBeRemoved
* cleanups; use more specific global
* rename globals to match others
Co-authored-by: Michael James Duminy <michael-james.duminy@klarna.com>
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* chore: bump React Native to 0.64 RC
* Snapshot update
* Bumped node version to 12 on CI
* Removed removed supress_comment syntax from config
* codemod types-first
* Prettied files after codemod
* Added flow types to API returns
* don't return null from fireEvent handlers
* return ReactTestInstance instead of any
* fix render returning any
* less anys
* less anys
* simplify call type
* simplify
* add Flow to missing files, type debug better
Co-authored-by: Michał Parkitny <michal.parkitny@callstack.com>
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* feat: export root test instance from render
* test: add tests for root test instance returned from render function
* docs: add description about root test instance returned from render function
* feat: change root export to container and wrap component in View if no wrapper defined
* docs: update description about container test instance returned from render function
* test: update tests for root test instance returned from render function
* test: clean up comments in tests
* feat: add react-native as peerDependency, clean up lint ignore for lines that was importing react-native
* revert adding default wrapper
* rework tests
* reword docs
* add testID checks
* add comments
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* Added @testing-library/jest-native to devDependencies
* Tests for jest-native matchers
* Added @testing-library/jest-native install info
* Update README.md
* Update GettingStarted.md
* feat: add `findBy*` queries (#304)
* 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 (#308)
* chore: bump eslint config to latest
* lint fix
* lint pass
* use roles directly
* Trying to fix CI build
* Added $FlowFixMe for missing flow expect extensions
* Small doc fixes
* Clarified failing toHaveProps matcher tests
* Moved lint ignore for color literals to .eslintrc
* Updated toHaveProp tests to avoid strange `Button` behavior
* Updated yarn.lock
* Update README.md
* Update website/docs/GettingStarted.md
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
* Proof of concept - CodeSandbox embed
* Prettier fix
* Moved examples below API Reference
* Created the examples directory
Includes react-navigation example
* Article on React Navigation
* Specify rootDir for testing
Prevents CI to run example tests
* remove jest-transform-stub and identity-obj-proxy, add transformIgnorePatterns
* update docs
* rearrange
* remove non-essential files
* rename Navigation -> AppNavigator
* reword comment
* add links and explanations
* remove index file, because it's not an app anyway
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>