@testing-library/react-native 13.3.0-beta.1 → 13.3.1
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/build/helpers/logger.d.ts +22 -0
- package/build/helpers/logger.js +13 -7
- package/build/helpers/logger.js.map +1 -1
- package/build/render-hook.d.ts +3 -2
- package/build/render-hook.js +0 -2
- package/build/render-hook.js.map +1 -1
- package/build/tsconfig.release.tsbuildinfo +1 -1
- package/build/types.d.ts +4 -0
- package/build/types.js.map +1 -1
- package/package.json +24 -24
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
export declare const _console: {
|
|
2
|
+
debug: {
|
|
3
|
+
(...data: any[]): void;
|
|
4
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
6
|
+
};
|
|
7
|
+
info: {
|
|
8
|
+
(...data: any[]): void;
|
|
9
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
10
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
11
|
+
};
|
|
12
|
+
warn: {
|
|
13
|
+
(...data: any[]): void;
|
|
14
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
15
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
16
|
+
};
|
|
17
|
+
error: {
|
|
18
|
+
(...data: any[]): void;
|
|
19
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
20
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
1
23
|
export declare const logger: {
|
|
2
24
|
debug(message: unknown, ...args: unknown[]): void;
|
|
3
25
|
info(message: unknown, ...args: unknown[]): void;
|
package/build/helpers/logger.js
CHANGED
|
@@ -3,29 +3,35 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.logger = void 0;
|
|
7
|
-
var _chalk = _interopRequireDefault(require("chalk"));
|
|
6
|
+
exports.logger = exports._console = void 0;
|
|
8
7
|
var nodeConsole = _interopRequireWildcard(require("console"));
|
|
8
|
+
var _picocolors = _interopRequireDefault(require("picocolors"));
|
|
9
9
|
var _redent = _interopRequireDefault(require("redent"));
|
|
10
10
|
var nodeUtil = _interopRequireWildcard(require("util"));
|
|
11
|
-
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); }
|
|
12
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); }
|
|
13
|
+
const _console = exports._console = {
|
|
14
|
+
debug: nodeConsole.debug,
|
|
15
|
+
info: nodeConsole.info,
|
|
16
|
+
warn: nodeConsole.warn,
|
|
17
|
+
error: nodeConsole.error
|
|
18
|
+
};
|
|
13
19
|
const logger = exports.logger = {
|
|
14
20
|
debug(message, ...args) {
|
|
15
21
|
const output = formatMessage('●', message, ...args);
|
|
16
|
-
|
|
22
|
+
_console.debug(_picocolors.default.dim(output));
|
|
17
23
|
},
|
|
18
24
|
info(message, ...args) {
|
|
19
25
|
const output = formatMessage('●', message, ...args);
|
|
20
|
-
|
|
26
|
+
_console.info(output);
|
|
21
27
|
},
|
|
22
28
|
warn(message, ...args) {
|
|
23
29
|
const output = formatMessage('▲', message, ...args);
|
|
24
|
-
|
|
30
|
+
_console.warn(_picocolors.default.yellow(output));
|
|
25
31
|
},
|
|
26
32
|
error(message, ...args) {
|
|
27
33
|
const output = formatMessage('■', message, ...args);
|
|
28
|
-
|
|
34
|
+
_console.error(_picocolors.default.red(output));
|
|
29
35
|
}
|
|
30
36
|
};
|
|
31
37
|
function formatMessage(symbol, message, ...args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","names":["
|
|
1
|
+
{"version":3,"file":"logger.js","names":["nodeConsole","_interopRequireWildcard","require","_picocolors","_interopRequireDefault","_redent","nodeUtil","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_console","exports","debug","info","warn","error","logger","message","args","output","formatMessage","pc","dim","yellow","red","symbol","formatted","format","indented","redent","trimStart"],"sources":["../../src/helpers/logger.ts"],"sourcesContent":["import * as nodeConsole from 'console';\nimport pc from 'picocolors';\nimport redent from 'redent';\nimport * as nodeUtil from 'util';\n\nexport const _console = {\n debug: nodeConsole.debug,\n info: nodeConsole.info,\n warn: nodeConsole.warn,\n error: nodeConsole.error,\n};\n\nexport const logger = {\n debug(message: unknown, ...args: unknown[]) {\n const output = formatMessage('●', message, ...args);\n _console.debug(pc.dim(output));\n },\n\n info(message: unknown, ...args: unknown[]) {\n const output = formatMessage('●', message, ...args);\n _console.info(output);\n },\n\n warn(message: unknown, ...args: unknown[]) {\n const output = formatMessage('▲', message, ...args);\n _console.warn(pc.yellow(output));\n },\n\n error(message: unknown, ...args: unknown[]) {\n const output = formatMessage('■', message, ...args);\n _console.error(pc.red(output));\n },\n};\n\nfunction formatMessage(symbol: string, message: unknown, ...args: unknown[]) {\n const formatted = nodeUtil.format(message, ...args);\n const indented = redent(formatted, 4);\n return ` ${symbol} ${indented.trimStart()}\\n`;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAL,uBAAA,CAAAC,OAAA;AAAiC,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAM,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,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAG,CAAA,OAAAK,CAAA,IAAAD,CAAA,GAAAS,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAG,CAAA,OAAAK,CAAA,CAAAI,GAAA,IAAAJ,CAAA,CAAAK,GAAA,IAAAN,C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,mBAAE,CAACG,GAAG,CAACL,MAAM,CAAC,CAAC;EAChC;AACF,CAAC;AAED,SAASC,aAAaA,CAACK,MAAc,EAAER,OAAgB,EAAE,GAAGC,IAAe,EAAE;EAC3E,MAAMQ,SAAS,GAAGpC,QAAQ,CAACqC,MAAM,CAACV,OAAO,EAAE,GAAGC,IAAI,CAAC;EACnD,MAAMU,QAAQ,GAAG,IAAAC,eAAM,EAACH,SAAS,EAAE,CAAC,CAAC;EACrC,OAAO,KAAKD,MAAM,IAAIG,QAAQ,CAACE,SAAS,CAAC,CAAC,IAAI;AAChD","ignoreList":[]}
|
package/build/render-hook.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { RefObject } from './types';
|
|
2
3
|
export type RenderHookResult<Result, Props> = {
|
|
3
|
-
result:
|
|
4
|
+
result: RefObject<Result>;
|
|
4
5
|
rerender: (props: Props) => void;
|
|
5
6
|
unmount: () => void;
|
|
6
7
|
};
|
|
7
8
|
export type RenderHookAsyncResult<Result, Props> = {
|
|
8
|
-
result:
|
|
9
|
+
result: RefObject<Result>;
|
|
9
10
|
rerenderAsync: (props: Props) => Promise<void>;
|
|
10
11
|
unmountAsync: () => Promise<void>;
|
|
11
12
|
};
|
package/build/render-hook.js
CHANGED
|
@@ -35,7 +35,6 @@ function renderHook(hookToRender, options) {
|
|
|
35
35
|
hookProps: initialProps
|
|
36
36
|
}), renderOptions);
|
|
37
37
|
return {
|
|
38
|
-
// Result should already be set after the first render effects are run.
|
|
39
38
|
result: result,
|
|
40
39
|
rerender: hookProps => rerenderComponent(/*#__PURE__*/React.createElement(HookContainer, {
|
|
41
40
|
hookProps: hookProps
|
|
@@ -68,7 +67,6 @@ async function renderHookAsync(hookToRender, options) {
|
|
|
68
67
|
hookProps: initialProps
|
|
69
68
|
}), renderOptions);
|
|
70
69
|
return {
|
|
71
|
-
// Result should already be set after the first render effects are run.
|
|
72
70
|
result: result,
|
|
73
71
|
rerenderAsync: hookProps => rerenderComponentAsync(/*#__PURE__*/React.createElement(TestComponent, {
|
|
74
72
|
hookProps: hookProps
|
package/build/render-hook.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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';\n\nexport type RenderHookResult<Result, Props> = {\n result:
|
|
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 /**\n * Set to `false` to disable concurrent rendering.\n * Otherwise `renderHook` will default to concurrent rendering.\n */\n concurrentRoot?: boolean;\n};\n\nexport function renderHook<Result, Props>(\n hookToRender: (props: Props) => Result,\n options?: RenderHookOptions<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<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,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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":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/act.ts","../src/cleanup.ts","../src/config.ts","../src/event-handler.ts","../src/fire-event.ts","../src/flush-micro-tasks.ts","../src/index.ts","../src/matches.ts","../src/native-state.ts","../src/pure.ts","../src/react-versions.ts","../src/render-act.ts","../src/render-async.tsx","../src/render-hook.tsx","../src/render.tsx","../src/screen.ts","../src/types.ts","../src/wait-for-element-to-be-removed.ts","../src/wait-for.ts","../src/within.ts","../src/helpers/accessibility.ts","../src/helpers/component-tree.ts","../src/helpers/debug.ts","../src/helpers/ensure-peer-deps.ts","../src/helpers/errors.ts","../src/helpers/find-all.ts","../src/helpers/format-element.ts","../src/helpers/host-component-names.ts","../src/helpers/logger.ts","../src/helpers/map-props.ts","../src/helpers/object.ts","../src/helpers/pointer-events.ts","../src/helpers/string-validation.ts","../src/helpers/text-content.ts","../src/helpers/text-input.ts","../src/helpers/timers.ts","../src/helpers/wrap-async.ts","../src/helpers/matchers/match-accessibility-state.ts","../src/helpers/matchers/match-accessibility-value.ts","../src/helpers/matchers/match-array-prop.ts","../src/helpers/matchers/match-label-text.ts","../src/helpers/matchers/match-object-prop.ts","../src/helpers/matchers/match-string-prop.ts","../src/helpers/matchers/match-text-content.ts","../src/matchers/extend-expect.ts","../src/matchers/index.ts","../src/matchers/to-be-busy.ts","../src/matchers/to-be-checked.ts","../src/matchers/to-be-disabled.ts","../src/matchers/to-be-empty-element.ts","../src/matchers/to-be-expanded.ts","../src/matchers/to-be-on-the-screen.ts","../src/matchers/to-be-partially-checked.ts","../src/matchers/to-be-selected.ts","../src/matchers/to-be-visible.ts","../src/matchers/to-contain-element.ts","../src/matchers/to-have-accessibility-value.ts","../src/matchers/to-have-accessible-name.ts","../src/matchers/to-have-display-value.ts","../src/matchers/to-have-prop.ts","../src/matchers/to-have-style.ts","../src/matchers/to-have-text-content.ts","../src/matchers/types.ts","../src/matchers/utils.ts","../src/queries/display-value.ts","../src/queries/hint-text.ts","../src/queries/label-text.ts","../src/queries/make-queries.ts","../src/queries/options.ts","../src/queries/placeholder-text.ts","../src/queries/role.ts","../src/queries/test-id.ts","../src/queries/text.ts","../src/queries/unsafe-props.ts","../src/queries/unsafe-type.ts","../src/test-utils/console.ts","../src/test-utils/events.ts","../src/user-event/clear.ts","../src/user-event/index.ts","../src/user-event/paste.ts","../src/user-event/event-builder/base.ts","../src/user-event/event-builder/common.ts","../src/user-event/event-builder/index.ts","../src/user-event/event-builder/scroll-view.ts","../src/user-event/event-builder/text-input.ts","../src/user-event/press/index.ts","../src/user-event/press/press.ts","../src/user-event/scroll/index.ts","../src/user-event/scroll/scroll-to.ts","../src/user-event/scroll/utils.ts","../src/user-event/setup/index.ts","../src/user-event/setup/setup.ts","../src/user-event/type/index.ts","../src/user-event/type/parse-keys.ts","../src/user-event/type/type.ts","../src/user-event/utils/content-size.ts","../src/user-event/utils/dispatch-event.ts","../src/user-event/utils/index.ts","../src/user-event/utils/text-range.ts","../src/user-event/utils/wait.ts"],"version":"5.
|
|
1
|
+
{"root":["../src/act.ts","../src/cleanup.ts","../src/config.ts","../src/event-handler.ts","../src/fire-event.ts","../src/flush-micro-tasks.ts","../src/index.ts","../src/matches.ts","../src/native-state.ts","../src/pure.ts","../src/react-versions.ts","../src/render-act.ts","../src/render-async.tsx","../src/render-hook.tsx","../src/render.tsx","../src/screen.ts","../src/types.ts","../src/wait-for-element-to-be-removed.ts","../src/wait-for.ts","../src/within.ts","../src/helpers/accessibility.ts","../src/helpers/component-tree.ts","../src/helpers/debug.ts","../src/helpers/ensure-peer-deps.ts","../src/helpers/errors.ts","../src/helpers/find-all.ts","../src/helpers/format-element.ts","../src/helpers/host-component-names.ts","../src/helpers/logger.ts","../src/helpers/map-props.ts","../src/helpers/object.ts","../src/helpers/pointer-events.ts","../src/helpers/string-validation.ts","../src/helpers/text-content.ts","../src/helpers/text-input.ts","../src/helpers/timers.ts","../src/helpers/wrap-async.ts","../src/helpers/matchers/match-accessibility-state.ts","../src/helpers/matchers/match-accessibility-value.ts","../src/helpers/matchers/match-array-prop.ts","../src/helpers/matchers/match-label-text.ts","../src/helpers/matchers/match-object-prop.ts","../src/helpers/matchers/match-string-prop.ts","../src/helpers/matchers/match-text-content.ts","../src/matchers/extend-expect.ts","../src/matchers/index.ts","../src/matchers/to-be-busy.ts","../src/matchers/to-be-checked.ts","../src/matchers/to-be-disabled.ts","../src/matchers/to-be-empty-element.ts","../src/matchers/to-be-expanded.ts","../src/matchers/to-be-on-the-screen.ts","../src/matchers/to-be-partially-checked.ts","../src/matchers/to-be-selected.ts","../src/matchers/to-be-visible.ts","../src/matchers/to-contain-element.ts","../src/matchers/to-have-accessibility-value.ts","../src/matchers/to-have-accessible-name.ts","../src/matchers/to-have-display-value.ts","../src/matchers/to-have-prop.ts","../src/matchers/to-have-style.ts","../src/matchers/to-have-text-content.ts","../src/matchers/types.ts","../src/matchers/utils.ts","../src/queries/display-value.ts","../src/queries/hint-text.ts","../src/queries/label-text.ts","../src/queries/make-queries.ts","../src/queries/options.ts","../src/queries/placeholder-text.ts","../src/queries/role.ts","../src/queries/test-id.ts","../src/queries/text.ts","../src/queries/unsafe-props.ts","../src/queries/unsafe-type.ts","../src/test-utils/console.ts","../src/test-utils/events.ts","../src/user-event/clear.ts","../src/user-event/index.ts","../src/user-event/paste.ts","../src/user-event/event-builder/base.ts","../src/user-event/event-builder/common.ts","../src/user-event/event-builder/index.ts","../src/user-event/event-builder/scroll-view.ts","../src/user-event/event-builder/text-input.ts","../src/user-event/press/index.ts","../src/user-event/press/press.ts","../src/user-event/scroll/index.ts","../src/user-event/scroll/scroll-to.ts","../src/user-event/scroll/utils.ts","../src/user-event/setup/index.ts","../src/user-event/setup/setup.ts","../src/user-event/type/index.ts","../src/user-event/type/parse-keys.ts","../src/user-event/type/type.ts","../src/user-event/utils/content-size.ts","../src/user-event/utils/dispatch-event.ts","../src/user-event/utils/index.ts","../src/user-event/utils/text-range.ts","../src/user-event/utils/wait.ts"],"version":"5.9.2"}
|
package/build/types.d.ts
CHANGED
package/build/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["/**\n * Location of an element.\n */\nexport interface Point {\n y: number;\n x: number;\n}\n\n/**\n * Size of an element.\n */\nexport interface Size {\n height: number;\n width: number;\n}\n\n// TS autocomplete trick\n// Ref: https://github.com/microsoft/TypeScript/issues/29729#issuecomment-567871939\nexport type StringWithAutocomplete<T> = T | (string & {});\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["/** `RefObject` type from React 19. */\nexport type RefObject<T> = {\n current: T;\n};\n\n/**\n * Location of an element.\n */\nexport interface Point {\n y: number;\n x: number;\n}\n\n/**\n * Size of an element.\n */\nexport interface Size {\n height: number;\n width: number;\n}\n\n// TS autocomplete trick\n// Ref: https://github.com/microsoft/TypeScript/issues/29729#issuecomment-567871939\nexport type StringWithAutocomplete<T> = T | (string & {});\n"],"mappings":"","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testing-library/react-native",
|
|
3
|
-
"version": "13.3.
|
|
3
|
+
"version": "13.3.1",
|
|
4
4
|
"description": "Simple and complete React Native testing utilities that encourage good testing practices.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"typings/index.flow.js"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"pretty-format": "^30.0.
|
|
50
|
+
"jest-matcher-utils": "^30.0.5",
|
|
51
|
+
"picocolors": "^1.1.1",
|
|
52
|
+
"pretty-format": "^30.0.5",
|
|
53
53
|
"redent": "^3.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
@@ -64,36 +64,36 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@babel/cli": "^7.
|
|
68
|
-
"@babel/core": "^7.
|
|
69
|
-
"@babel/plugin-transform-strict-mode": "^7.
|
|
70
|
-
"@babel/preset-env": "^7.
|
|
71
|
-
"@babel/preset-flow": "^7.
|
|
72
|
-
"@babel/preset-react": "^7.
|
|
73
|
-
"@babel/preset-typescript": "^7.
|
|
67
|
+
"@babel/cli": "^7.28.3",
|
|
68
|
+
"@babel/core": "^7.28.3",
|
|
69
|
+
"@babel/plugin-transform-strict-mode": "^7.27.1",
|
|
70
|
+
"@babel/preset-env": "^7.28.3",
|
|
71
|
+
"@babel/preset-flow": "^7.27.1",
|
|
72
|
+
"@babel/preset-react": "^7.27.1",
|
|
73
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
74
74
|
"@callstack/eslint-config": "^15.0.0",
|
|
75
|
-
"@react-native/babel-preset": "0.81.0
|
|
76
|
-
"@release-it/conventional-changelog": "^10.0.
|
|
75
|
+
"@react-native/babel-preset": "0.81.0",
|
|
76
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
77
77
|
"@relmify/jest-serializer-strip-ansi": "^1.0.2",
|
|
78
78
|
"@types/jest": "^30.0.0",
|
|
79
|
-
"@types/node": "^24.0
|
|
80
|
-
"@types/react": "^19.1.
|
|
79
|
+
"@types/node": "^24.3.0",
|
|
80
|
+
"@types/react": "^19.1.10",
|
|
81
81
|
"@types/react-test-renderer": "^19.1.0",
|
|
82
|
-
"babel-jest": "^30.0.
|
|
82
|
+
"babel-jest": "^30.0.5",
|
|
83
83
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
84
84
|
"del-cli": "^6.0.0",
|
|
85
|
-
"eslint": "^9.
|
|
85
|
+
"eslint": "^9.33.0",
|
|
86
86
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
87
87
|
"flow-bin": "~0.170.0",
|
|
88
|
-
"jest": "^30.0.
|
|
89
|
-
"prettier": "^
|
|
88
|
+
"jest": "^30.0.5",
|
|
89
|
+
"prettier": "^3.6.2",
|
|
90
90
|
"react": "19.1.0",
|
|
91
|
-
"react-native": "0.81.0
|
|
92
|
-
"react-native-gesture-handler": "^2.
|
|
91
|
+
"react-native": "0.81.0",
|
|
92
|
+
"react-native-gesture-handler": "^2.28.0",
|
|
93
93
|
"react-test-renderer": "19.1.0",
|
|
94
|
-
"release-it": "^19.0.
|
|
95
|
-
"typescript": "^5.
|
|
96
|
-
"typescript-eslint": "^8.
|
|
94
|
+
"release-it": "^19.0.4",
|
|
95
|
+
"typescript": "^5.9.2",
|
|
96
|
+
"typescript-eslint": "^8.39.1"
|
|
97
97
|
},
|
|
98
98
|
"publishConfig": {
|
|
99
99
|
"registry": "https://registry.npmjs.org"
|