Files
callstack__react-native-tes…/src/within.js
T
Michał d6265d9dcb chore: bump React Native to 0.64 RC (#626)
* 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>
2020-12-09 17:49:39 +01:00

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;