File tree 3 files changed +10
-23
lines changed
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
-
3
1
import * as React from 'react' ;
4
2
import { View , Text } from 'react-native' ;
5
3
import { render , screen } from '../..' ;
Original file line number Diff line number Diff line change 1
- /// <reference path="./extend-expect.d.ts" />
2
-
3
1
import { toBeOnTheScreen } from './to-be-on-the-screen' ;
4
2
import { toBeChecked } from './to-be-checked' ;
5
3
import { toBeCollapsed } from './to-be-collapsed' ;
@@ -18,6 +16,8 @@ import { toHaveProp } from './to-have-prop';
18
16
import { toHaveStyle } from './to-have-style' ;
19
17
import { toHaveTextContent } from './to-have-text-content' ;
20
18
19
+ export type * from './types' ;
20
+
21
21
expect . extend ( {
22
22
toBeOnTheScreen,
23
23
toBeChecked,
Original file line number Diff line number Diff line change 1
1
import type { StyleProp } from 'react-native' ;
2
2
import 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' ;
3
6
4
7
export interface JestNativeMatchers < R > {
8
+ /**
9
+ * Assert whether an element is present in the element tree or not.
10
+ */
5
11
toBeOnTheScreen ( ) : R ;
12
+
6
13
toBeChecked ( ) : R ;
7
14
toBeCollapsed ( ) : R ;
8
15
toBeDisabled ( ) : R ;
@@ -31,26 +38,8 @@ declare global {
31
38
}
32
39
33
40
// Explicit `@jest/globals` `expect` matchers.
41
+ // @ts -ignore
34
42
declare module '@jest/expect' {
35
43
interface Matchers < R extends void | Promise < void > >
36
44
extends JestNativeMatchers < R > { }
37
45
}
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