This repository was archived by the owner on Jul 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " native-testing-library" ,
3
- "version" : " 3. 0.0-rc.0 " ,
3
+ "version" : " 0.0.0-semantically-released " ,
4
4
"description" : " Simple and complete React Native testing utilities that encourage good testing practices." ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -48,4 +48,4 @@ function toJSON(node) {
48
48
}
49
49
}
50
50
51
- export { flat , toJSON } ;
51
+ export { toJSON } ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { NativeTestInstance } from './query-helpers';
9
9
declare const within : typeof getQueriesForElement ;
10
10
11
11
interface Query extends Function {
12
- ( testRenderer : ReactTestRenderer , ...args : any [ ] ) :
12
+ ( testRenderer : ReactTestRenderer | NativeTestInstance , ...args : any [ ] ) :
13
13
| Error
14
14
| Promise < HTMLElement [ ] >
15
15
| Promise < HTMLElement >
@@ -23,6 +23,7 @@ interface Queries {
23
23
}
24
24
25
25
export type RenderResult < Q extends Queries = typeof queries > = {
26
+ baseElement : NativeTestInstance ;
26
27
container : NativeTestInstance ;
27
28
debug : ( ) => void ;
28
29
rerender : ( ui : ReactElement ) => void ;
@@ -48,6 +49,7 @@ export function render<Q extends Queries>(
48
49
export const act : ( callback : ( ) => void ) => void ;
49
50
50
51
export { queries , queryHelpers , within } ;
52
+ export * from './to-json' ;
51
53
export * from './config' ;
52
54
export * from './events' ;
53
55
export * from './get-node-text' ;
Original file line number Diff line number Diff line change
1
+ import { NativeTestInstance } from './query-helpers' ;
2
+
3
+ export interface NativeTestInstanceJSON {
4
+ type : string ;
5
+ props : { [ propName : string ] : any } ;
6
+ children : null | Array < NativeTestInstanceJSON > ;
7
+ $$typeof ?: Symbol ;
8
+ parent : NativeTestInstance ;
9
+ }
10
+
11
+ export const toJSON : ( node : NativeTestInstance ) => NativeTestInstanceJSON ;
You can’t perform that action at this time.
0 commit comments