Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Commit 0b81240

Browse files
committed
chore: prepare for final release
1 parent 11b7b1d commit 0b81240

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "native-testing-library",
3-
"version": "3.0.0-rc.0",
3+
"version": "0.0.0-semantically-released",
44
"description": "Simple and complete React Native testing utilities that encourage good testing practices.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/lib/to-json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ function toJSON(node) {
4848
}
4949
}
5050

51-
export { flat, toJSON };
51+
export { toJSON };

typings/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { NativeTestInstance } from './query-helpers';
99
declare const within: typeof getQueriesForElement;
1010

1111
interface Query extends Function {
12-
(testRenderer: ReactTestRenderer, ...args: any[]):
12+
(testRenderer: ReactTestRenderer | NativeTestInstance, ...args: any[]):
1313
| Error
1414
| Promise<HTMLElement[]>
1515
| Promise<HTMLElement>
@@ -23,6 +23,7 @@ interface Queries {
2323
}
2424

2525
export type RenderResult<Q extends Queries = typeof queries> = {
26+
baseElement: NativeTestInstance;
2627
container: NativeTestInstance;
2728
debug: () => void;
2829
rerender: (ui: ReactElement) => void;
@@ -48,6 +49,7 @@ export function render<Q extends Queries>(
4849
export const act: (callback: () => void) => void;
4950

5051
export { queries, queryHelpers, within };
52+
export * from './to-json';
5153
export * from './config';
5254
export * from './events';
5355
export * from './get-node-text';

typings/to-json.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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;

0 commit comments

Comments
 (0)