File tree Expand file tree Collapse file tree 3 files changed +10
-23
lines changed Expand file tree Collapse file tree 3 files changed +10
-23
lines changed Original file line number Diff line number Diff line change 1- /// <reference path="../extend-expect.d.ts" />
2-
31import * as React from 'react' ;
42import { View , Text } from 'react-native' ;
53import { render , screen } from '../..' ;
Original file line number Diff line number Diff line change 1- /// <reference path="./extend-expect.d.ts" />
2-
31import { toBeOnTheScreen } from './to-be-on-the-screen' ;
42import { toBeChecked } from './to-be-checked' ;
53import { toBeCollapsed } from './to-be-collapsed' ;
@@ -18,6 +16,8 @@ import { toHaveProp } from './to-have-prop';
1816import { toHaveStyle } from './to-have-style' ;
1917import { toHaveTextContent } from './to-have-text-content' ;
2018
19+ export type * from './types' ;
20+
2121expect . extend ( {
2222 toBeOnTheScreen,
2323 toBeChecked,
Original file line number Diff line number Diff line change 11import type { StyleProp } from 'react-native' ;
22import type { ReactTestInstance } from 'react-test-renderer' ;
3+ import { AccessibilityValueMatcher } from '../helpers/matchers/match-accessibility-value' ;
4+ import { TextMatch , TextMatchOptions } from '../matches' ;
5+ import { Style } from './to-have-style' ;
36
47export interface JestNativeMatchers < R > {
8+ /**
9+ * Assert whether an element is present in the element tree or not.
10+ */
511 toBeOnTheScreen ( ) : R ;
12+
613 toBeChecked ( ) : R ;
714 toBeCollapsed ( ) : R ;
815 toBeDisabled ( ) : R ;
@@ -31,26 +38,8 @@ declare global {
3138}
3239
3340// Explicit `@jest/globals` `expect` matchers.
41+ // @ts -ignore
3442declare module '@jest/expect' {
3543 interface Matchers < R extends void | Promise < void > >
3644 extends JestNativeMatchers < R > { }
3745}
38-
39- // Used types
40-
41- export type Style = ViewStyle | TextStyle | ImageStyle ;
42-
43- export interface AccessibilityValueMatcher {
44- min ?: number ;
45- max ?: number ;
46- now ?: number ;
47- text ?: TextMatch ;
48- }
49-
50- export type TextMatch = string | RegExp ;
51- export type TextMatchOptions = {
52- exact ?: boolean ;
53- normalizer ?: NormalizerFn ;
54- } ;
55-
56- export type NormalizerFn = ( textToNormalize : string ) => string ;
You can’t perform that action at this time.
0 commit comments