mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
d6265d9dcb
* 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>
19 lines
553 B
JavaScript
19 lines
553 B
JavaScript
// @flow
|
|
import { getByAPI, type GetByAPI } from './helpers/getByAPI';
|
|
import { queryByAPI, type QueryByAPI } from './helpers/queryByAPI';
|
|
import { findByAPI, type FindByAPI } from './helpers/findByAPI';
|
|
import { a11yAPI, type A11yAPI } from './helpers/a11yAPI';
|
|
|
|
export function within(
|
|
instance: ReactTestInstance
|
|
): { ...FindByAPI, ...QueryByAPI, ...GetByAPI, ...A11yAPI } {
|
|
return {
|
|
...getByAPI(instance),
|
|
...queryByAPI(instance),
|
|
...findByAPI(instance),
|
|
...a11yAPI(instance),
|
|
};
|
|
}
|
|
|
|
export const getQueriesForElement = within;
|