@testing-library/react-native 14.0.0-alpha.1 → 14.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -11
- package/build/act.d.ts +2 -4
- package/build/act.js +4 -5
- package/build/act.js.map +1 -1
- package/build/cleanup.d.ts +3 -1
- package/build/cleanup.js +8 -0
- package/build/cleanup.js.map +1 -1
- package/build/event-handler.d.ts +2 -2
- package/build/event-handler.js +10 -10
- package/build/event-handler.js.map +1 -1
- package/build/fire-event.d.ts +8 -1
- package/build/fire-event.js +44 -28
- package/build/fire-event.js.map +1 -1
- package/build/helpers/accessibility.js +5 -2
- package/build/helpers/accessibility.js.map +1 -1
- package/build/helpers/component-tree.d.ts +8 -8
- package/build/helpers/component-tree.js +19 -16
- package/build/helpers/component-tree.js.map +1 -1
- package/build/helpers/debug.d.ts +1 -1
- package/build/helpers/debug.js +6 -7
- package/build/helpers/debug.js.map +1 -1
- package/build/helpers/find-all.js +7 -27
- package/build/helpers/find-all.js.map +1 -1
- package/build/helpers/format-element.d.ts +3 -3
- package/build/helpers/format-element.js +9 -9
- package/build/helpers/format-element.js.map +1 -1
- package/build/helpers/host-component-names.d.ts +0 -1
- package/build/helpers/host-component-names.js +7 -9
- package/build/helpers/host-component-names.js.map +1 -1
- package/build/helpers/logger.d.ts +22 -0
- package/build/helpers/logger.js +13 -8
- package/build/helpers/logger.js.map +1 -1
- package/build/helpers/pointer-events.js +9 -5
- package/build/helpers/pointer-events.js.map +1 -1
- package/build/helpers/wrap-async.d.ts +0 -1
- package/build/helpers/wrap-async.js +0 -1
- package/build/helpers/wrap-async.js.map +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.flow.js +5 -4
- package/build/index.js +1 -12
- package/build/index.js.map +1 -1
- package/build/matchers/to-be-empty-element.js +6 -3
- package/build/matchers/to-be-empty-element.js.map +1 -1
- package/build/matchers/to-be-visible.js +3 -3
- package/build/matchers/to-be-visible.js.map +1 -1
- package/build/matchers/to-contain-element.js +1 -2
- package/build/matchers/to-contain-element.js.map +1 -1
- package/build/matchers/to-have-style.js +1 -1
- package/build/matchers/to-have-style.js.map +1 -1
- package/build/matchers/utils.js +3 -2
- package/build/matchers/utils.js.map +1 -1
- package/build/pure.d.ts +7 -5
- package/build/pure.js +30 -4
- package/build/pure.js.map +1 -1
- package/build/queries/display-value.d.ts +1 -1
- package/build/queries/display-value.js +9 -9
- package/build/queries/display-value.js.map +1 -1
- package/build/queries/hint-text.d.ts +1 -1
- package/build/queries/hint-text.js +9 -9
- package/build/queries/hint-text.js.map +1 -1
- package/build/queries/label-text.d.ts +1 -1
- package/build/queries/label-text.js +9 -9
- package/build/queries/label-text.js.map +1 -1
- package/build/queries/make-queries.d.ts +2 -2
- package/build/queries/make-queries.js +11 -11
- package/build/queries/make-queries.js.map +1 -1
- package/build/queries/placeholder-text.d.ts +1 -1
- package/build/queries/placeholder-text.js +9 -9
- package/build/queries/placeholder-text.js.map +1 -1
- package/build/queries/role.d.ts +2 -2
- package/build/queries/role.js +16 -9
- package/build/queries/role.js.map +1 -1
- package/build/queries/test-id.d.ts +1 -1
- package/build/queries/test-id.js +9 -9
- package/build/queries/test-id.js.map +1 -1
- package/build/queries/text.d.ts +1 -1
- package/build/queries/text.js +9 -9
- package/build/queries/text.js.map +1 -1
- package/build/react-versions.js +1 -2
- package/build/react-versions.js.map +1 -1
- package/build/render-act.d.ts +3 -0
- package/build/render-act.js +29 -0
- package/build/render-act.js.map +1 -0
- package/build/render-async.d.ts +83 -0
- package/build/render-async.js +96 -0
- package/build/render-async.js.map +1 -0
- package/build/render-hook.d.ts +9 -7
- package/build/render-hook.js +44 -14
- package/build/render-hook.js.map +1 -1
- package/build/render.d.ts +86 -17
- package/build/render.js +44 -27
- package/build/render.js.map +1 -1
- package/build/screen.js +7 -7
- package/build/screen.js.map +1 -1
- package/build/test-utils/console.d.ts +1 -0
- package/build/test-utils/console.js +17 -0
- package/build/test-utils/console.js.map +1 -0
- package/build/test-utils/json.d.ts +6 -0
- package/build/test-utils/json.js +33 -0
- package/build/test-utils/json.js.map +1 -0
- package/build/tsconfig.release.tsbuildinfo +1 -1
- package/build/types.d.ts +4 -0
- package/build/types.js.map +1 -1
- package/build/user-event/clear.js +4 -4
- package/build/user-event/clear.js.map +1 -1
- package/build/user-event/paste.js +8 -8
- package/build/user-event/paste.js.map +1 -1
- package/build/user-event/press/press.js +17 -10
- package/build/user-event/press/press.js.map +1 -1
- package/build/user-event/scroll/scroll-to.js +7 -7
- package/build/user-event/scroll/scroll-to.js.map +1 -1
- package/build/user-event/type/type.js +11 -11
- package/build/user-event/type/type.js.map +1 -1
- package/build/user-event/utils/dispatch-event.d.ts +1 -1
- package/build/user-event/utils/dispatch-event.js +4 -4
- package/build/user-event/utils/dispatch-event.js.map +1 -1
- package/build/wait-for.js +3 -1
- package/build/wait-for.js.map +1 -1
- package/build/within.d.ts +19 -19
- package/build/within.js +8 -8
- package/build/within.js.map +1 -1
- package/package.json +37 -35
- package/typings/index.flow.js +5 -4
- package/build/test-utils/index.d.ts +0 -1
- package/build/test-utils/index.js +0 -17
- package/build/test-utils/index.js.map +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { HostElement } from 'universal-test-renderer';
|
|
3
|
+
import type { DebugOptions } from './helpers/debug';
|
|
4
|
+
export interface RenderAsyncOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Pass a React Component as the wrapper option to have it rendered around the inner element. This is most useful for creating
|
|
7
|
+
* reusable custom render functions for common data providers.
|
|
8
|
+
*/
|
|
9
|
+
wrapper?: React.ComponentType<any>;
|
|
10
|
+
createNodeMock?: (element: React.ReactElement) => unknown;
|
|
11
|
+
}
|
|
12
|
+
export type RenderAsyncResult = ReturnType<typeof renderAsync>;
|
|
13
|
+
/**
|
|
14
|
+
* Renders test component deeply using React Test Renderer and exposes helpers
|
|
15
|
+
* to assert on the output.
|
|
16
|
+
*/
|
|
17
|
+
export default function renderAsync<T>(component: React.ReactElement<T>, options?: RenderAsyncOptions): Promise<{
|
|
18
|
+
rerender: (_component: React.ReactElement) => never;
|
|
19
|
+
rerenderAsync: (component: React.ReactElement) => Promise<void>;
|
|
20
|
+
update: (_component: React.ReactElement) => never;
|
|
21
|
+
updateAsync: (component: React.ReactElement) => Promise<void>;
|
|
22
|
+
unmount: () => never;
|
|
23
|
+
unmountAsync: () => Promise<void>;
|
|
24
|
+
toJSON: () => import("universal-test-renderer").JsonNode | null;
|
|
25
|
+
debug: DebugFunction;
|
|
26
|
+
container: HostElement;
|
|
27
|
+
root: HostElement | null;
|
|
28
|
+
getByRole: import("./queries/make-queries").GetByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
29
|
+
getAllByRole: import("./queries/make-queries").GetAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
30
|
+
queryByRole: import("./queries/make-queries").QueryByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
31
|
+
queryAllByRole: import("./queries/make-queries").QueryAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
32
|
+
findByRole: import("./queries/make-queries").FindByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
33
|
+
findAllByRole: import("./queries/make-queries").FindAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
34
|
+
getByHintText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
35
|
+
getAllByHintText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
36
|
+
queryByHintText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
37
|
+
queryAllByHintText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
38
|
+
findByHintText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
39
|
+
findAllByHintText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
40
|
+
getByA11yHint: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
41
|
+
getAllByA11yHint: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
42
|
+
queryByA11yHint: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
43
|
+
queryAllByA11yHint: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
44
|
+
findByA11yHint: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
45
|
+
findAllByA11yHint: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
46
|
+
getByAccessibilityHint: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
47
|
+
getAllByAccessibilityHint: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
48
|
+
queryByAccessibilityHint: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
49
|
+
queryAllByAccessibilityHint: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
50
|
+
findByAccessibilityHint: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
51
|
+
findAllByAccessibilityHint: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
52
|
+
getByLabelText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
53
|
+
getAllByLabelText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
54
|
+
queryByLabelText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
55
|
+
queryAllByLabelText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
56
|
+
findByLabelText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
57
|
+
findAllByLabelText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
58
|
+
getByPlaceholderText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
59
|
+
getAllByPlaceholderText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
60
|
+
queryByPlaceholderText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
61
|
+
queryAllByPlaceholderText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
62
|
+
findByPlaceholderText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
63
|
+
findAllByPlaceholderText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
64
|
+
getByDisplayValue: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
65
|
+
getAllByDisplayValue: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
66
|
+
queryByDisplayValue: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
67
|
+
queryAllByDisplayValue: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
68
|
+
findByDisplayValue: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
69
|
+
findAllByDisplayValue: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
70
|
+
getByTestId: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
71
|
+
getAllByTestId: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
72
|
+
queryByTestId: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
73
|
+
queryAllByTestId: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
74
|
+
findByTestId: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
75
|
+
findAllByTestId: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
76
|
+
getByText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
77
|
+
getAllByText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
78
|
+
queryByText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
79
|
+
queryAllByText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
80
|
+
findByText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
81
|
+
findAllByText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
82
|
+
}>;
|
|
83
|
+
export type DebugFunction = (options?: DebugOptions) => void;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = renderAsync;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _act = _interopRequireDefault(require("./act"));
|
|
9
|
+
var _cleanup = require("./cleanup");
|
|
10
|
+
var _config = require("./config");
|
|
11
|
+
var _debug = require("./helpers/debug");
|
|
12
|
+
var _errors = require("./helpers/errors");
|
|
13
|
+
var _renderAct = require("./render-act");
|
|
14
|
+
var _screen = require("./screen");
|
|
15
|
+
var _within = require("./within");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
|
+
/**
|
|
19
|
+
* Renders test component deeply using React Test Renderer and exposes helpers
|
|
20
|
+
* to assert on the output.
|
|
21
|
+
*/
|
|
22
|
+
async function renderAsync(component, options = {}) {
|
|
23
|
+
const {
|
|
24
|
+
wrapper: Wrapper
|
|
25
|
+
} = options || {};
|
|
26
|
+
|
|
27
|
+
// TODO allow passing some options
|
|
28
|
+
const rendererOptions = {};
|
|
29
|
+
const wrap = element => Wrapper ? /*#__PURE__*/React.createElement(Wrapper, null, element) : element;
|
|
30
|
+
const renderer = await (0, _renderAct.renderWithAsyncAct)(wrap(component), rendererOptions);
|
|
31
|
+
return buildRenderResult(renderer, wrap);
|
|
32
|
+
}
|
|
33
|
+
function buildRenderResult(renderer, wrap) {
|
|
34
|
+
const container = renderer.container;
|
|
35
|
+
const rerender = _component => {
|
|
36
|
+
throw new _errors.ErrorWithStack('"rerender(...)" is not supported when using "renderAsync" use "await rerenderAsync(...)" instead', rerender);
|
|
37
|
+
};
|
|
38
|
+
const rerenderAsync = async component => {
|
|
39
|
+
// eslint-disable-next-line require-await
|
|
40
|
+
await (0, _act.default)(async () => {
|
|
41
|
+
renderer.render(wrap(component));
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
const unmount = () => {
|
|
45
|
+
throw new _errors.ErrorWithStack('"unmount()" is not supported when using "renderAsync" use "await unmountAsync()" instead', unmount);
|
|
46
|
+
};
|
|
47
|
+
const unmountAsync = async () => {
|
|
48
|
+
// eslint-disable-next-line require-await
|
|
49
|
+
await (0, _act.default)(async () => {
|
|
50
|
+
renderer.unmount();
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
(0, _cleanup.addToCleanupQueue)(unmountAsync);
|
|
54
|
+
const result = {
|
|
55
|
+
...(0, _within.getQueriesForElement)(renderer.container),
|
|
56
|
+
rerender,
|
|
57
|
+
rerenderAsync,
|
|
58
|
+
update: rerender,
|
|
59
|
+
// alias for `rerender`
|
|
60
|
+
updateAsync: rerenderAsync,
|
|
61
|
+
// alias for `rerenderAsync`
|
|
62
|
+
unmount,
|
|
63
|
+
unmountAsync,
|
|
64
|
+
toJSON: () => renderer.container.toJSON(),
|
|
65
|
+
debug: makeDebug(renderer),
|
|
66
|
+
get container() {
|
|
67
|
+
return renderer.container;
|
|
68
|
+
},
|
|
69
|
+
get root() {
|
|
70
|
+
const firstChild = container.children[0];
|
|
71
|
+
if (typeof firstChild === 'string') {
|
|
72
|
+
throw new Error('Invariant Violation: Root element must be a host element. Detected attempt to render a string within the root element.');
|
|
73
|
+
}
|
|
74
|
+
return firstChild;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
(0, _screen.setRenderResult)(result);
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
function makeDebug(renderer) {
|
|
81
|
+
function debugImpl(options) {
|
|
82
|
+
const {
|
|
83
|
+
defaultDebugOptions
|
|
84
|
+
} = (0, _config.getConfig)();
|
|
85
|
+
const debugOptions = {
|
|
86
|
+
...defaultDebugOptions,
|
|
87
|
+
...options
|
|
88
|
+
};
|
|
89
|
+
const json = renderer.container.toJSON();
|
|
90
|
+
if (json) {
|
|
91
|
+
return (0, _debug.debug)(json, debugOptions);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return debugImpl;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=render-async.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-async.js","names":["React","_interopRequireWildcard","require","_act","_interopRequireDefault","_cleanup","_config","_debug","_errors","_renderAct","_screen","_within","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","renderAsync","component","options","wrapper","Wrapper","rendererOptions","wrap","element","createElement","renderer","renderWithAsyncAct","buildRenderResult","container","rerender","_component","ErrorWithStack","rerenderAsync","act","render","unmount","unmountAsync","addToCleanupQueue","result","getQueriesForElement","update","updateAsync","toJSON","debug","makeDebug","root","firstChild","children","Error","setRenderResult","debugImpl","defaultDebugOptions","getConfig","debugOptions","json"],"sources":["../src/render-async.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { HostElement, Root, RootOptions } from 'universal-test-renderer';\n\nimport act from './act';\nimport { addToCleanupQueue } from './cleanup';\nimport { getConfig } from './config';\nimport type { DebugOptions } from './helpers/debug';\nimport { debug } from './helpers/debug';\nimport { ErrorWithStack } from './helpers/errors';\nimport { renderWithAsyncAct } from './render-act';\nimport { setRenderResult } from './screen';\nimport { getQueriesForElement } from './within';\n\nexport interface RenderAsyncOptions {\n /**\n * Pass a React Component as the wrapper option to have it rendered around the inner element. This is most useful for creating\n * reusable custom render functions for common data providers.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrapper?: React.ComponentType<any>;\n\n createNodeMock?: (element: React.ReactElement) => unknown;\n}\n\nexport type RenderAsyncResult = ReturnType<typeof renderAsync>;\n\n/**\n * Renders test component deeply using React Test Renderer and exposes helpers\n * to assert on the output.\n */\nexport default async function renderAsync<T>(\n component: React.ReactElement<T>,\n options: RenderAsyncOptions = {},\n) {\n const { wrapper: Wrapper } = options || {};\n\n // TODO allow passing some options\n const rendererOptions: RootOptions = {};\n\n const wrap = (element: React.ReactElement) => (Wrapper ? <Wrapper>{element}</Wrapper> : element);\n const renderer = await renderWithAsyncAct(wrap(component), rendererOptions);\n return buildRenderResult(renderer, wrap);\n}\n\nfunction buildRenderResult(\n renderer: Root,\n wrap: (element: React.ReactElement) => React.JSX.Element,\n) {\n const container = renderer.container;\n\n const rerender = (_component: React.ReactElement) => {\n throw new ErrorWithStack(\n '\"rerender(...)\" is not supported when using \"renderAsync\" use \"await rerenderAsync(...)\" instead',\n rerender,\n );\n };\n const rerenderAsync = async (component: React.ReactElement) => {\n // eslint-disable-next-line require-await\n await act(async () => {\n renderer.render(wrap(component));\n });\n };\n\n const unmount = () => {\n throw new ErrorWithStack(\n '\"unmount()\" is not supported when using \"renderAsync\" use \"await unmountAsync()\" instead',\n unmount,\n );\n };\n const unmountAsync = async () => {\n // eslint-disable-next-line require-await\n await act(async () => {\n renderer.unmount();\n });\n };\n\n addToCleanupQueue(unmountAsync);\n\n const result = {\n ...getQueriesForElement(renderer.container),\n rerender,\n rerenderAsync,\n update: rerender, // alias for `rerender`\n updateAsync: rerenderAsync, // alias for `rerenderAsync`\n unmount,\n unmountAsync,\n toJSON: () => renderer.container.toJSON(),\n debug: makeDebug(renderer),\n get container(): HostElement {\n return renderer.container;\n },\n get root(): HostElement | null {\n const firstChild = container.children[0];\n if (typeof firstChild === 'string') {\n throw new Error(\n 'Invariant Violation: Root element must be a host element. Detected attempt to render a string within the root element.',\n );\n }\n\n return firstChild;\n },\n };\n\n setRenderResult(result);\n\n return result;\n}\n\nexport type DebugFunction = (options?: DebugOptions) => void;\n\nfunction makeDebug(renderer: Root): DebugFunction {\n function debugImpl(options?: DebugOptions) {\n const { defaultDebugOptions } = getConfig();\n const debugOptions = { ...defaultDebugOptions, ...options };\n const json = renderer.container.toJSON();\n if (json) {\n return debug(json, debugOptions);\n }\n }\n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,SAAS;AAClB","ignoreList":[]}
|
package/build/render-hook.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { RefObject } from './types';
|
|
2
3
|
export type RenderHookResult<Result, Props> = {
|
|
4
|
+
result: RefObject<Result>;
|
|
3
5
|
rerender: (props: Props) => void;
|
|
4
|
-
result: React.MutableRefObject<Result>;
|
|
5
6
|
unmount: () => void;
|
|
6
7
|
};
|
|
8
|
+
export type RenderHookAsyncResult<Result, Props> = {
|
|
9
|
+
result: RefObject<Result>;
|
|
10
|
+
rerenderAsync: (props: Props) => Promise<void>;
|
|
11
|
+
unmountAsync: () => Promise<void>;
|
|
12
|
+
};
|
|
7
13
|
export type RenderHookOptions<Props> = {
|
|
8
14
|
/**
|
|
9
15
|
* The initial props to pass to the hook.
|
|
@@ -14,10 +20,6 @@ export type RenderHookOptions<Props> = {
|
|
|
14
20
|
* reusable custom render functions for common data providers.
|
|
15
21
|
*/
|
|
16
22
|
wrapper?: React.ComponentType<any>;
|
|
17
|
-
/**
|
|
18
|
-
* Set to `false` to disable concurrent rendering.
|
|
19
|
-
* Otherwise `renderHook` will default to concurrent rendering.
|
|
20
|
-
*/
|
|
21
|
-
concurrentRoot?: boolean;
|
|
22
23
|
};
|
|
23
|
-
export declare function renderHook<Result, Props>(hookToRender: (props: Props) => Result, options?: RenderHookOptions<Props
|
|
24
|
+
export declare function renderHook<Result, Props>(hookToRender: (props: Props) => Result, options?: RenderHookOptions<NoInfer<Props>>): RenderHookResult<Result, Props>;
|
|
25
|
+
export declare function renderHookAsync<Result, Props>(hookToRender: (props: Props) => Result, options?: RenderHookOptions<NoInfer<Props>>): Promise<RenderHookAsyncResult<Result, Props>>;
|
package/build/render-hook.js
CHANGED
|
@@ -4,15 +4,45 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.renderHook = renderHook;
|
|
7
|
+
exports.renderHookAsync = renderHookAsync;
|
|
7
8
|
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _render = require("./render");
|
|
9
|
-
|
|
10
|
-
function
|
|
9
|
+
var _render = _interopRequireDefault(require("./render"));
|
|
10
|
+
var _renderAsync = _interopRequireDefault(require("./render-async"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
11
13
|
function renderHook(hookToRender, options) {
|
|
14
|
+
const result = /*#__PURE__*/React.createRef();
|
|
15
|
+
function HookContainer({
|
|
16
|
+
hookProps
|
|
17
|
+
}) {
|
|
18
|
+
const renderResult = hookToRender(hookProps);
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
result.current = renderResult;
|
|
21
|
+
});
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
12
24
|
const {
|
|
13
25
|
initialProps,
|
|
14
26
|
...renderOptions
|
|
15
27
|
} = options ?? {};
|
|
28
|
+
const {
|
|
29
|
+
rerender: rerenderComponent,
|
|
30
|
+
unmount
|
|
31
|
+
} = (0, _render.default)(
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
// @ts-expect-error since option can be undefined, initialProps can be undefined when it should'nt
|
|
34
|
+
React.createElement(HookContainer, {
|
|
35
|
+
hookProps: initialProps
|
|
36
|
+
}), renderOptions);
|
|
37
|
+
return {
|
|
38
|
+
result: result,
|
|
39
|
+
rerender: hookProps => rerenderComponent(/*#__PURE__*/React.createElement(HookContainer, {
|
|
40
|
+
hookProps: hookProps
|
|
41
|
+
})),
|
|
42
|
+
unmount
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
async function renderHookAsync(hookToRender, options) {
|
|
16
46
|
const result = /*#__PURE__*/React.createRef();
|
|
17
47
|
function TestComponent({
|
|
18
48
|
hookProps
|
|
@@ -24,24 +54,24 @@ function renderHook(hookToRender, options) {
|
|
|
24
54
|
return null;
|
|
25
55
|
}
|
|
26
56
|
const {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} =
|
|
57
|
+
initialProps,
|
|
58
|
+
...renderOptions
|
|
59
|
+
} = options ?? {};
|
|
60
|
+
const {
|
|
61
|
+
rerenderAsync: rerenderComponentAsync,
|
|
62
|
+
unmountAsync
|
|
63
|
+
} = await (0, _renderAsync.default)(
|
|
30
64
|
/*#__PURE__*/
|
|
31
65
|
// @ts-expect-error since option can be undefined, initialProps can be undefined when it should'nt
|
|
32
66
|
React.createElement(TestComponent, {
|
|
33
67
|
hookProps: initialProps
|
|
34
68
|
}), renderOptions);
|
|
35
|
-
function rerender(hookProps) {
|
|
36
|
-
return componentRerender(/*#__PURE__*/React.createElement(TestComponent, {
|
|
37
|
-
hookProps: hookProps
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
69
|
return {
|
|
41
|
-
// Result should already be set after the first render effects are run.
|
|
42
70
|
result: result,
|
|
43
|
-
|
|
44
|
-
|
|
71
|
+
rerenderAsync: hookProps => rerenderComponentAsync(/*#__PURE__*/React.createElement(TestComponent, {
|
|
72
|
+
hookProps: hookProps
|
|
73
|
+
})),
|
|
74
|
+
unmountAsync
|
|
45
75
|
};
|
|
46
76
|
}
|
|
47
77
|
//# sourceMappingURL=render-hook.js.map
|
package/build/render-hook.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-hook.js","names":["React","_interopRequireWildcard","require","_render","
|
|
1
|
+
{"version":3,"file":"render-hook.js","names":["React","_interopRequireWildcard","require","_render","_interopRequireDefault","_renderAsync","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","renderHook","hookToRender","options","result","createRef","HookContainer","hookProps","renderResult","useEffect","current","initialProps","renderOptions","rerender","rerenderComponent","unmount","render","createElement","renderHookAsync","TestComponent","rerenderAsync","rerenderComponentAsync","unmountAsync","renderAsync"],"sources":["../src/render-hook.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport render from './render';\nimport renderAsync from './render-async';\nimport type { RefObject } from './types';\n\nexport type RenderHookResult<Result, Props> = {\n result: RefObject<Result>;\n rerender: (props: Props) => void;\n unmount: () => void;\n};\n\nexport type RenderHookAsyncResult<Result, Props> = {\n result: RefObject<Result>;\n rerenderAsync: (props: Props) => Promise<void>;\n unmountAsync: () => Promise<void>;\n};\n\nexport type RenderHookOptions<Props> = {\n /**\n * The initial props to pass to the hook.\n */\n initialProps?: Props;\n\n /**\n * Pass a React Component as the wrapper option to have it rendered around the inner element. This is most useful for creating\n * reusable custom render functions for common data providers.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrapper?: React.ComponentType<any>;\n};\n\nexport function renderHook<Result, Props>(\n hookToRender: (props: Props) => Result,\n options?: RenderHookOptions<NoInfer<Props>>,\n): RenderHookResult<Result, Props> {\n const result = React.createRef<Result>() as RefObject<Result>;\n\n function HookContainer({ hookProps }: { hookProps: Props }) {\n const renderResult = hookToRender(hookProps);\n React.useEffect(() => {\n result.current = renderResult;\n });\n\n return null;\n }\n\n const { initialProps, ...renderOptions } = options ?? {};\n const { rerender: rerenderComponent, unmount } = render(\n // @ts-expect-error since option can be undefined, initialProps can be undefined when it should'nt\n <HookContainer hookProps={initialProps} />,\n renderOptions,\n );\n\n return {\n result: result,\n rerender: (hookProps: Props) => rerenderComponent(<HookContainer hookProps={hookProps} />),\n unmount,\n };\n}\n\nexport async function renderHookAsync<Result, Props>(\n hookToRender: (props: Props) => Result,\n options?: RenderHookOptions<NoInfer<Props>>,\n): Promise<RenderHookAsyncResult<Result, Props>> {\n const result = React.createRef<Result>() as RefObject<Result>;\n\n function TestComponent({ hookProps }: { hookProps: Props }) {\n const renderResult = hookToRender(hookProps);\n React.useEffect(() => {\n result.current = renderResult;\n });\n\n return null;\n }\n\n const { initialProps, ...renderOptions } = options ?? {};\n const { rerenderAsync: rerenderComponentAsync, unmountAsync } = await renderAsync(\n // @ts-expect-error since option can be undefined, initialProps can be undefined when it should'nt\n <TestComponent hookProps={initialProps} />,\n renderOptions,\n );\n\n return {\n result: result,\n rerenderAsync: (hookProps: Props) =>\n rerenderComponentAsync(<TestComponent hookProps={hookProps} />),\n unmountAsync,\n };\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AAAyC,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAK,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,G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C;AACH;AAEO,eAAeG,eAAeA,CACnChB,YAAsC,EACtCC,OAA2C,EACI;EAC/C,MAAMC,MAAM,gBAAG5B,KAAK,CAAC6B,SAAS,CAAS,CAAsB;EAE7D,SAASc,aAAaA,CAAC;IAAEZ;EAAgC,CAAC,EAAE;IAC1D,MAAMC,YAAY,GAAGN,YAAY,CAACK,SAAS,CAAC;IAC5C/B,KAAK,CAACiC,SAAS,CAAC,MAAM;MACpBL,MAAM,CAACM,OAAO,GAAGF,YAAY;IAC/B,CAAC,CAAC;IAEF,OAAO,IAAI;EACb;EAEA,MAAM;IAAEG,YAAY;IAAE,GAAGC;EAAc,CAAC,GAAGT,OAAO,IAAI,CAAC,CAAC;EACxD,MAAM;IAAEiB,aAAa,EAAEC,sBAAsB;IAAEC;EAAa,CAAC,GAAG,MAAM,IAAAC,oBAAW;EAAA;EAC/E;EACA/C,KAAA,CAAAyC,aAAA,CAACE,aAAa;IAACZ,SAAS,EAAEI;EAAa,CAAE,CAAC,EAC1CC,aACF,CAAC;EAED,OAAO;IACLR,MAAM,EAAEA,MAAM;IACdgB,aAAa,EAAGb,SAAgB,IAC9Bc,sBAAsB,cAAC7C,KAAA,CAAAyC,aAAA,CAACE,aAAa;MAACZ,SAAS,EAAEA;IAAU,CAAE,CAAC,CAAC;IACjEe;EACF,CAAC;AACH","ignoreList":[]}
|
package/build/render.d.ts
CHANGED
|
@@ -7,45 +7,96 @@ export interface RenderOptions {
|
|
|
7
7
|
* reusable custom render functions for common data providers.
|
|
8
8
|
*/
|
|
9
9
|
wrapper?: React.ComponentType<any>;
|
|
10
|
-
createNodeMock?: (element: React.ReactElement) =>
|
|
10
|
+
createNodeMock?: (element: React.ReactElement) => unknown;
|
|
11
11
|
}
|
|
12
12
|
export type RenderResult = ReturnType<typeof render>;
|
|
13
13
|
/**
|
|
14
14
|
* Renders test component deeply using React Test Renderer and exposes helpers
|
|
15
15
|
* to assert on the output.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
18
|
-
|
|
17
|
+
export default function render<T>(component: React.ReactElement<T>, options?: RenderOptions): {
|
|
18
|
+
rerender: (component: React.ReactElement) => void;
|
|
19
|
+
rerenderAsync: (component: React.ReactElement) => Promise<void>;
|
|
20
|
+
update: (component: React.ReactElement) => void;
|
|
21
|
+
updateAsync: (component: React.ReactElement) => Promise<void>;
|
|
19
22
|
unmount: () => void;
|
|
20
|
-
|
|
21
|
-
toJSON: () => import("universal-test-renderer").JsonNode | null
|
|
23
|
+
unmountAsync: () => Promise<void>;
|
|
24
|
+
toJSON: () => import("universal-test-renderer").JsonNode | null;
|
|
22
25
|
debug: DebugFunction;
|
|
23
26
|
container: HostElement;
|
|
24
27
|
root: HostElement | null;
|
|
25
|
-
getByText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
26
|
-
getAllByText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
27
|
-
queryByText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
28
|
-
queryAllByText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
29
|
-
findByText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
30
|
-
findAllByText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
31
|
-
getByTestId: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
32
|
-
getAllByTestId: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
33
|
-
queryByTestId: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
34
|
-
queryAllByTestId: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
35
|
-
findByTestId: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
36
|
-
findAllByTestId: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
37
28
|
getByRole: import("./queries/make-queries").GetByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
38
29
|
getAllByRole: import("./queries/make-queries").GetAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
39
30
|
queryByRole: import("./queries/make-queries").QueryByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
40
31
|
queryAllByRole: import("./queries/make-queries").QueryAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
41
32
|
findByRole: import("./queries/make-queries").FindByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
42
33
|
findAllByRole: import("./queries/make-queries").FindAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
34
|
+
getByHintText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
35
|
+
getAllByHintText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
36
|
+
queryByHintText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
37
|
+
queryAllByHintText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
38
|
+
findByHintText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
39
|
+
findAllByHintText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
40
|
+
getByA11yHint: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
41
|
+
getAllByA11yHint: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
42
|
+
queryByA11yHint: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
43
|
+
queryAllByA11yHint: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
44
|
+
findByA11yHint: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
45
|
+
findAllByA11yHint: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
46
|
+
getByAccessibilityHint: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
47
|
+
getAllByAccessibilityHint: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
48
|
+
queryByAccessibilityHint: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
49
|
+
queryAllByAccessibilityHint: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
50
|
+
findByAccessibilityHint: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
51
|
+
findAllByAccessibilityHint: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
43
52
|
getByLabelText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
44
53
|
getAllByLabelText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
45
54
|
queryByLabelText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
46
55
|
queryAllByLabelText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
47
56
|
findByLabelText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
48
57
|
findAllByLabelText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
58
|
+
getByPlaceholderText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
59
|
+
getAllByPlaceholderText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
60
|
+
queryByPlaceholderText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
61
|
+
queryAllByPlaceholderText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
62
|
+
findByPlaceholderText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
63
|
+
findAllByPlaceholderText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
64
|
+
getByDisplayValue: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
65
|
+
getAllByDisplayValue: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
66
|
+
queryByDisplayValue: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
67
|
+
queryAllByDisplayValue: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
68
|
+
findByDisplayValue: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
69
|
+
findAllByDisplayValue: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
70
|
+
getByTestId: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
71
|
+
getAllByTestId: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
72
|
+
queryByTestId: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
73
|
+
queryAllByTestId: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
74
|
+
findByTestId: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
75
|
+
findAllByTestId: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
76
|
+
getByText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
77
|
+
getAllByText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
78
|
+
queryByText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
79
|
+
queryAllByText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
80
|
+
findByText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
81
|
+
findAllByText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
82
|
+
};
|
|
83
|
+
export declare function renderInternal<T>(component: React.ReactElement<T>, options?: RenderOptions): {
|
|
84
|
+
rerender: (component: React.ReactElement) => void;
|
|
85
|
+
rerenderAsync: (component: React.ReactElement) => Promise<void>;
|
|
86
|
+
update: (component: React.ReactElement) => void;
|
|
87
|
+
updateAsync: (component: React.ReactElement) => Promise<void>;
|
|
88
|
+
unmount: () => void;
|
|
89
|
+
unmountAsync: () => Promise<void>;
|
|
90
|
+
toJSON: () => import("universal-test-renderer").JsonNode | null;
|
|
91
|
+
debug: DebugFunction;
|
|
92
|
+
container: HostElement;
|
|
93
|
+
root: HostElement | null;
|
|
94
|
+
getByRole: import("./queries/make-queries").GetByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
95
|
+
getAllByRole: import("./queries/make-queries").GetAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
96
|
+
queryByRole: import("./queries/make-queries").QueryByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
97
|
+
queryAllByRole: import("./queries/make-queries").QueryAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
98
|
+
findByRole: import("./queries/make-queries").FindByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
99
|
+
findAllByRole: import("./queries/make-queries").FindAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
49
100
|
getByHintText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
50
101
|
getAllByHintText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
51
102
|
queryByHintText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
@@ -64,6 +115,12 @@ export declare function render<T>(element: React.ReactElement<T>, options?: Rend
|
|
|
64
115
|
queryAllByAccessibilityHint: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
65
116
|
findByAccessibilityHint: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
66
117
|
findAllByAccessibilityHint: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
118
|
+
getByLabelText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
119
|
+
getAllByLabelText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
120
|
+
queryByLabelText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
121
|
+
queryAllByLabelText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
122
|
+
findByLabelText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
123
|
+
findAllByLabelText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
67
124
|
getByPlaceholderText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
68
125
|
getAllByPlaceholderText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
69
126
|
queryByPlaceholderText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
@@ -76,5 +133,17 @@ export declare function render<T>(element: React.ReactElement<T>, options?: Rend
|
|
|
76
133
|
queryAllByDisplayValue: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
77
134
|
findByDisplayValue: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
78
135
|
findAllByDisplayValue: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
136
|
+
getByTestId: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
137
|
+
getAllByTestId: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
138
|
+
queryByTestId: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
139
|
+
queryAllByTestId: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
140
|
+
findByTestId: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
141
|
+
findAllByTestId: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
142
|
+
getByText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
143
|
+
getAllByText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
144
|
+
queryByText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
145
|
+
queryAllByText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
146
|
+
findByText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
147
|
+
findAllByText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
79
148
|
};
|
|
80
149
|
export type DebugFunction = (options?: DebugOptions) => void;
|