@testing-library/react-native 14.0.0-alpha.0 → 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 +8 -12
- 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 +7 -0
- package/build/event-handler.js +30 -0
- package/build/event-handler.js.map +1 -0
- package/build/fire-event.d.ts +11 -4
- package/build/fire-event.js +43 -37
- package/build/fire-event.js.map +1 -1
- package/build/helpers/accessibility.d.ts +2 -2
- 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 +3 -3
- package/build/helpers/debug.js +8 -11
- package/build/helpers/debug.js.map +1 -1
- package/build/helpers/errors.js +4 -4
- package/build/helpers/errors.js.map +1 -1
- package/build/helpers/find-all.d.ts +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 +18 -0
- package/build/helpers/format-element.js +80 -0
- package/build/helpers/format-element.js.map +1 -0
- package/build/helpers/host-component-names.d.ts +1 -1
- package/build/helpers/host-component-names.js +6 -7
- package/build/helpers/host-component-names.js.map +1 -1
- package/build/helpers/logger.d.ts +28 -0
- package/build/helpers/logger.js +42 -0
- package/build/helpers/logger.js.map +1 -0
- package/build/helpers/{format-default.d.ts → map-props.d.ts} +1 -0
- package/build/helpers/{format-default.js → map-props.js} +2 -2
- package/build/helpers/map-props.js.map +1 -0
- package/build/helpers/matchers/match-accessibility-state.d.ts +1 -1
- package/build/helpers/matchers/match-accessibility-state.js.map +1 -1
- package/build/helpers/matchers/match-accessibility-value.d.ts +2 -2
- package/build/helpers/matchers/match-accessibility-value.js.map +1 -1
- package/build/helpers/matchers/match-label-text.d.ts +2 -2
- package/build/helpers/matchers/match-label-text.js.map +1 -1
- package/build/helpers/matchers/match-string-prop.d.ts +1 -1
- package/build/helpers/matchers/match-string-prop.js.map +1 -1
- package/build/helpers/matchers/match-text-content.d.ts +2 -2
- package/build/helpers/matchers/match-text-content.js.map +1 -1
- package/build/helpers/object.d.ts +1 -1
- package/build/helpers/object.js.map +1 -1
- package/build/helpers/pointer-events.d.ts +1 -1
- package/build/helpers/pointer-events.js +9 -5
- package/build/helpers/pointer-events.js.map +1 -1
- package/build/helpers/text-content.d.ts +1 -1
- package/build/helpers/text-content.js.map +1 -1
- package/build/helpers/text-input.d.ts +1 -1
- package/build/helpers/text-input.js.map +1 -1
- package/build/helpers/timers.d.ts +1 -1
- package/build/helpers/timers.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 +33 -36
- package/build/index.js +4 -16
- package/build/index.js.map +1 -1
- package/build/matchers/extend-expect.js +2 -2
- package/build/matchers/extend-expect.js.map +1 -1
- package/build/matchers/index.d.ts +1 -1
- package/build/matchers/index.js.map +1 -1
- package/build/matchers/to-be-busy.d.ts +1 -1
- package/build/matchers/to-be-busy.js +4 -1
- package/build/matchers/to-be-busy.js.map +1 -1
- package/build/matchers/to-be-checked.d.ts +1 -1
- package/build/matchers/to-be-checked.js +4 -1
- package/build/matchers/to-be-checked.js.map +1 -1
- package/build/matchers/to-be-disabled.d.ts +1 -1
- package/build/matchers/to-be-disabled.js +5 -2
- package/build/matchers/to-be-disabled.js.map +1 -1
- package/build/matchers/to-be-empty-element.d.ts +1 -1
- package/build/matchers/to-be-empty-element.js +9 -3
- package/build/matchers/to-be-empty-element.js.map +1 -1
- package/build/matchers/to-be-expanded.d.ts +1 -1
- package/build/matchers/to-be-expanded.js +5 -2
- package/build/matchers/to-be-expanded.js.map +1 -1
- package/build/matchers/to-be-on-the-screen.d.ts +1 -1
- package/build/matchers/to-be-on-the-screen.js +4 -1
- package/build/matchers/to-be-on-the-screen.js.map +1 -1
- package/build/matchers/to-be-partially-checked.d.ts +1 -1
- package/build/matchers/to-be-partially-checked.js +4 -1
- package/build/matchers/to-be-partially-checked.js.map +1 -1
- package/build/matchers/to-be-selected.d.ts +1 -1
- package/build/matchers/to-be-selected.js +4 -1
- package/build/matchers/to-be-selected.js.map +1 -1
- package/build/matchers/to-be-visible.d.ts +1 -1
- package/build/matchers/to-be-visible.js +8 -5
- package/build/matchers/to-be-visible.js.map +1 -1
- package/build/matchers/to-contain-element.d.ts +1 -1
- package/build/matchers/to-contain-element.js +5 -3
- package/build/matchers/to-contain-element.js.map +1 -1
- package/build/matchers/to-have-accessibility-value.d.ts +2 -2
- package/build/matchers/to-have-accessibility-value.js.map +1 -1
- package/build/matchers/to-have-accessible-name.d.ts +2 -2
- package/build/matchers/to-have-accessible-name.js.map +1 -1
- package/build/matchers/to-have-display-value.d.ts +2 -2
- package/build/matchers/to-have-display-value.js +1 -1
- package/build/matchers/to-have-display-value.js.map +1 -1
- package/build/matchers/to-have-prop.d.ts +1 -1
- package/build/matchers/to-have-prop.js.map +1 -1
- package/build/matchers/to-have-style.d.ts +2 -2
- package/build/matchers/to-have-style.js +1 -1
- package/build/matchers/to-have-style.js.map +1 -1
- package/build/matchers/to-have-text-content.d.ts +2 -2
- package/build/matchers/to-have-text-content.js.map +1 -1
- package/build/matchers/types.d.ts +4 -4
- package/build/matchers/types.js.map +1 -1
- package/build/matchers/utils.d.ts +1 -8
- package/build/matchers/utils.js +3 -48
- package/build/matchers/utils.js.map +1 -1
- package/build/native-state.d.ts +3 -3
- package/build/native-state.js +1 -1
- package/build/native-state.js.map +1 -1
- package/build/pure.d.ts +6 -4
- package/build/pure.js +28 -2
- package/build/pure.js.map +1 -1
- package/build/queries/display-value.d.ts +3 -3
- package/build/queries/display-value.js +9 -9
- package/build/queries/display-value.js.map +1 -1
- package/build/queries/hint-text.d.ts +4 -4
- package/build/queries/hint-text.js +9 -9
- package/build/queries/hint-text.js.map +1 -1
- package/build/queries/label-text.d.ts +4 -4
- package/build/queries/label-text.js +9 -9
- package/build/queries/label-text.js.map +1 -1
- package/build/queries/make-queries.d.ts +3 -3
- package/build/queries/make-queries.js +15 -18
- package/build/queries/make-queries.js.map +1 -1
- package/build/queries/options.d.ts +1 -1
- package/build/queries/options.js.map +1 -1
- package/build/queries/placeholder-text.d.ts +3 -3
- package/build/queries/placeholder-text.js +10 -10
- package/build/queries/placeholder-text.js.map +1 -1
- package/build/queries/role.d.ts +7 -7
- package/build/queries/role.js +16 -9
- package/build/queries/role.js.map +1 -1
- package/build/queries/test-id.d.ts +3 -3
- package/build/queries/test-id.js +9 -9
- package/build/queries/test-id.js.map +1 -1
- package/build/queries/text.d.ts +3 -3
- 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 +18 -6
- package/build/render-hook.js +56 -26
- package/build/render-hook.js.map +1 -1
- package/build/render.d.ts +54 -48
- package/build/render.js +42 -30
- package/build/render.js.map +1 -1
- package/build/screen.d.ts +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.d.ts +2 -2
- package/build/user-event/clear.js +6 -6
- package/build/user-event/clear.js.map +1 -1
- package/build/user-event/event-builder/base.d.ts +2 -2
- package/build/user-event/event-builder/base.js.map +1 -1
- package/build/user-event/event-builder/scroll-view.d.ts +1 -1
- package/build/user-event/event-builder/scroll-view.js.map +1 -1
- package/build/user-event/event-builder/text-input.d.ts +2 -2
- package/build/user-event/event-builder/text-input.js.map +1 -1
- package/build/user-event/index.d.ts +4 -4
- package/build/user-event/index.js.map +1 -1
- package/build/user-event/paste.d.ts +2 -2
- package/build/user-event/paste.js +8 -8
- package/build/user-event/paste.js.map +1 -1
- package/build/user-event/press/index.d.ts +1 -1
- package/build/user-event/press/index.js.map +1 -1
- package/build/user-event/press/press.d.ts +2 -2
- package/build/user-event/press/press.js +48 -49
- package/build/user-event/press/press.js.map +1 -1
- package/build/user-event/scroll/index.d.ts +1 -1
- package/build/user-event/scroll/index.js.map +1 -1
- package/build/user-event/scroll/scroll-to.d.ts +3 -3
- package/build/user-event/scroll/scroll-to.js +8 -8
- package/build/user-event/scroll/scroll-to.js.map +1 -1
- package/build/user-event/scroll/utils.d.ts +1 -1
- package/build/user-event/scroll/utils.js.map +1 -1
- package/build/user-event/setup/setup.d.ts +4 -4
- package/build/user-event/setup/setup.js.map +1 -1
- package/build/user-event/type/type.d.ts +3 -2
- package/build/user-event/type/type.js +16 -14
- package/build/user-event/type/type.js.map +1 -1
- package/build/user-event/utils/content-size.d.ts +1 -1
- package/build/user-event/utils/content-size.js.map +1 -1
- package/build/user-event/utils/dispatch-event.d.ts +2 -2
- package/build/user-event/utils/dispatch-event.js +5 -15
- package/build/user-event/utils/dispatch-event.js.map +1 -1
- package/build/user-event/utils/wait.d.ts +6 -2
- package/build/user-event/utils/wait.js +1 -1
- package/build/user-event/utils/wait.js.map +1 -1
- package/build/wait-for-element-to-be-removed.js +1 -1
- package/build/wait-for-element-to-be-removed.js.map +1 -1
- package/build/wait-for.js +4 -5
- package/build/wait-for.js.map +1 -1
- package/build/within.d.ts +20 -20
- package/build/within.js +8 -8
- package/build/within.js.map +1 -1
- package/package.json +38 -32
- package/typings/index.flow.js +33 -36
- package/build/helpers/format-default.js.map +0 -1
- package/build/helpers/format.d.ts +0 -7
- package/build/helpers/format.js +0 -31
- package/build/helpers/format.js.map +0 -1
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HostElement } from 'universal-test-renderer';
|
|
2
|
-
import { TextMatch } from '../../matches';
|
|
1
|
+
import type { HostElement } from 'universal-test-renderer';
|
|
2
|
+
import type { TextMatch } from '../../matches';
|
|
3
3
|
export interface AccessibilityValueMatcher {
|
|
4
4
|
min?: number;
|
|
5
5
|
max?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-accessibility-value.js","names":["_accessibility","require","_matchStringProp","matchAccessibilityValue","node","matcher","value","computeAriaValue","min","undefined","max","now","text","matchStringProp"],"sources":["../../../src/helpers/matchers/match-accessibility-value.ts"],"sourcesContent":["import { HostElement } from 'universal-test-renderer';\nimport {
|
|
1
|
+
{"version":3,"file":"match-accessibility-value.js","names":["_accessibility","require","_matchStringProp","matchAccessibilityValue","node","matcher","value","computeAriaValue","min","undefined","max","now","text","matchStringProp"],"sources":["../../../src/helpers/matchers/match-accessibility-value.ts"],"sourcesContent":["import type { HostElement } from 'universal-test-renderer';\n\nimport type { TextMatch } from '../../matches';\nimport { computeAriaValue } from '../accessibility';\nimport { matchStringProp } from './match-string-prop';\n\nexport interface AccessibilityValueMatcher {\n min?: number;\n max?: number;\n now?: number;\n text?: TextMatch;\n}\n\nexport function matchAccessibilityValue(\n node: HostElement,\n matcher: AccessibilityValueMatcher,\n): boolean {\n const value = computeAriaValue(node);\n return (\n (matcher.min === undefined || matcher.min === value?.min) &&\n (matcher.max === undefined || matcher.max === value?.max) &&\n (matcher.now === undefined || matcher.now === value?.now) &&\n (matcher.text === undefined || matchStringProp(value?.text, matcher.text))\n );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AASO,SAASE,uBAAuBA,CACrCC,IAAiB,EACjBC,OAAkC,EACzB;EACT,MAAMC,KAAK,GAAG,IAAAC,+BAAgB,EAACH,IAAI,CAAC;EACpC,OACE,CAACC,OAAO,CAACG,GAAG,KAAKC,SAAS,IAAIJ,OAAO,CAACG,GAAG,KAAKF,KAAK,EAAEE,GAAG,MACvDH,OAAO,CAACK,GAAG,KAAKD,SAAS,IAAIJ,OAAO,CAACK,GAAG,KAAKJ,KAAK,EAAEI,GAAG,CAAC,KACxDL,OAAO,CAACM,GAAG,KAAKF,SAAS,IAAIJ,OAAO,CAACM,GAAG,KAAKL,KAAK,EAAEK,GAAG,CAAC,KACxDN,OAAO,CAACO,IAAI,KAAKH,SAAS,IAAI,IAAAI,gCAAe,EAACP,KAAK,EAAEM,IAAI,EAAEP,OAAO,CAACO,IAAI,CAAC,CAAC;AAE9E","ignoreList":[]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { HostElement } from 'universal-test-renderer';
|
|
2
|
-
import { TextMatch, TextMatchOptions } from '../../matches';
|
|
1
|
+
import type { HostElement } from 'universal-test-renderer';
|
|
2
|
+
import type { TextMatch, TextMatchOptions } from '../../matches';
|
|
3
3
|
export declare function matchAccessibilityLabel(element: HostElement, expectedLabel: TextMatch, options?: TextMatchOptions): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-label-text.js","names":["_matches","require","_accessibility","matchAccessibilityLabel","element","expectedLabel","options","matches","computeAriaLabel","normalizer","exact"],"sources":["../../../src/helpers/matchers/match-label-text.ts"],"sourcesContent":["import { HostElement } from 'universal-test-renderer';\nimport {
|
|
1
|
+
{"version":3,"file":"match-label-text.js","names":["_matches","require","_accessibility","matchAccessibilityLabel","element","expectedLabel","options","matches","computeAriaLabel","normalizer","exact"],"sources":["../../../src/helpers/matchers/match-label-text.ts"],"sourcesContent":["import type { HostElement } from 'universal-test-renderer';\n\nimport type { TextMatch, TextMatchOptions } from '../../matches';\nimport { matches } from '../../matches';\nimport { computeAriaLabel } from '../accessibility';\n\nexport function matchAccessibilityLabel(\n element: HostElement,\n expectedLabel: TextMatch,\n options?: TextMatchOptions,\n) {\n return matches(expectedLabel, computeAriaLabel(element), options?.normalizer, options?.exact);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAEO,SAASE,uBAAuBA,CACrCC,OAAoB,EACpBC,aAAwB,EACxBC,OAA0B,EAC1B;EACA,OAAO,IAAAC,gBAAO,EAACF,aAAa,EAAE,IAAAG,+BAAgB,EAACJ,OAAO,CAAC,EAAEE,OAAO,EAAEG,UAAU,EAAEH,OAAO,EAAEI,KAAK,CAAC;AAC/F","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-string-prop.js","names":["matchStringProp","prop","matcher","match"],"sources":["../../../src/helpers/matchers/match-string-prop.ts"],"sourcesContent":["import { TextMatch } from '../../matches';\n\n/**\n * Matches the given string property again string or regex matcher.\n *\n * @param prop - The string prop to match.\n * @param matcher - The string or regex to match.\n * @returns - Whether the string prop matches the given string or regex.\n */\nexport function matchStringProp(prop: string | undefined, matcher: TextMatch): boolean {\n if (!prop) {\n return false;\n }\n\n if (typeof matcher === 'string') {\n return prop === matcher;\n }\n\n return prop.match(matcher) != null;\n}\n"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,eAAeA,CAACC,IAAwB,EAAEC,OAAkB,EAAW;EACrF,IAAI,CAACD,IAAI,EAAE;IACT,OAAO,KAAK;EACd;EAEA,IAAI,OAAOC,OAAO,KAAK,QAAQ,EAAE;IAC/B,OAAOD,IAAI,KAAKC,OAAO;EACzB;EAEA,OAAOD,IAAI,CAACE,KAAK,CAACD,OAAO,CAAC,IAAI,IAAI;AACpC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"match-string-prop.js","names":["matchStringProp","prop","matcher","match"],"sources":["../../../src/helpers/matchers/match-string-prop.ts"],"sourcesContent":["import type { TextMatch } from '../../matches';\n\n/**\n * Matches the given string property again string or regex matcher.\n *\n * @param prop - The string prop to match.\n * @param matcher - The string or regex to match.\n * @returns - Whether the string prop matches the given string or regex.\n */\nexport function matchStringProp(prop: string | undefined, matcher: TextMatch): boolean {\n if (!prop) {\n return false;\n }\n\n if (typeof matcher === 'string') {\n return prop === matcher;\n }\n\n return prop.match(matcher) != null;\n}\n"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,eAAeA,CAACC,IAAwB,EAAEC,OAAkB,EAAW;EACrF,IAAI,CAACD,IAAI,EAAE;IACT,OAAO,KAAK;EACd;EAEA,IAAI,OAAOC,OAAO,KAAK,QAAQ,EAAE;IAC/B,OAAOD,IAAI,KAAKC,OAAO;EACzB;EAEA,OAAOD,IAAI,CAACE,KAAK,CAACD,OAAO,CAAC,IAAI,IAAI;AACpC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HostElement } from 'universal-test-renderer';
|
|
2
|
-
import { TextMatch, TextMatchOptions } from '../../matches';
|
|
1
|
+
import type { HostElement } from 'universal-test-renderer';
|
|
2
|
+
import type { TextMatch, TextMatchOptions } from '../../matches';
|
|
3
3
|
/**
|
|
4
4
|
* Matches the given node's text content against string or regex matcher.
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-text-content.js","names":["_matches","require","_textContent","matchTextContent","node","text","options","textContent","getTextContent","exact","normalizer","matches"],"sources":["../../../src/helpers/matchers/match-text-content.ts"],"sourcesContent":["import { HostElement } from 'universal-test-renderer';\nimport {
|
|
1
|
+
{"version":3,"file":"match-text-content.js","names":["_matches","require","_textContent","matchTextContent","node","text","options","textContent","getTextContent","exact","normalizer","matches"],"sources":["../../../src/helpers/matchers/match-text-content.ts"],"sourcesContent":["import type { HostElement } from 'universal-test-renderer';\n\nimport type { TextMatch, TextMatchOptions } from '../../matches';\nimport { matches } from '../../matches';\nimport { getTextContent } from '../text-content';\n\n/**\n * Matches the given node's text content against string or regex matcher.\n *\n * @param node - Node which text content will be matched\n * @param text - The string or regex to match.\n * @returns - Whether the node's text content matches the given string or regex.\n */\nexport function matchTextContent(\n node: HostElement,\n text: TextMatch,\n options: TextMatchOptions = {},\n) {\n const textContent = getTextContent(node);\n const { exact, normalizer } = options;\n return matches(text, textContent, normalizer, exact);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,gBAAgBA,CAC9BC,IAAiB,EACjBC,IAAe,EACfC,OAAyB,GAAG,CAAC,CAAC,EAC9B;EACA,MAAMC,WAAW,GAAG,IAAAC,2BAAc,EAACJ,IAAI,CAAC;EACxC,MAAM;IAAEK,KAAK;IAAEC;EAAW,CAAC,GAAGJ,OAAO;EACrC,OAAO,IAAAK,gBAAO,EAACN,IAAI,EAAEE,WAAW,EAAEG,UAAU,EAAED,KAAK,CAAC;AACtD","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function pick<T extends
|
|
1
|
+
export declare function pick<T extends object>(object: T, keys: (keyof T)[]): Partial<T>;
|
|
2
2
|
export declare function removeUndefinedKeys(prop: unknown): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.js","names":["pick","object","keys","result","forEach","key","undefined","isObject","value","Array","isArray","removeUndefinedKeys","prop","hasKeys","Object","entries"],"sources":["../../src/helpers/object.ts"],"sourcesContent":["export function pick<T extends
|
|
1
|
+
{"version":3,"file":"object.js","names":["pick","object","keys","result","forEach","key","undefined","isObject","value","Array","isArray","removeUndefinedKeys","prop","hasKeys","Object","entries"],"sources":["../../src/helpers/object.ts"],"sourcesContent":["export function pick<T extends object>(object: T, keys: (keyof T)[]): Partial<T> {\n const result: Partial<T> = {};\n keys.forEach((key) => {\n if (object[key] !== undefined) {\n result[key] = object[key];\n }\n });\n\n return result;\n}\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n\nexport function removeUndefinedKeys(prop: unknown) {\n if (!isObject(prop)) {\n return prop;\n }\n\n let hasKeys = false;\n const result: Record<string, unknown> = {};\n Object.entries(prop).forEach(([key, value]) => {\n if (value !== undefined) {\n result[key] = value;\n hasKeys = true;\n }\n });\n\n return hasKeys ? result : undefined;\n}\n"],"mappings":";;;;;;;AAAO,SAASA,IAAIA,CAAmBC,MAAS,EAAEC,IAAiB,EAAc;EAC/E,MAAMC,MAAkB,GAAG,CAAC,CAAC;EAC7BD,IAAI,CAACE,OAAO,CAAEC,GAAG,IAAK;IACpB,IAAIJ,MAAM,CAACI,GAAG,CAAC,KAAKC,SAAS,EAAE;MAC7BH,MAAM,CAACE,GAAG,CAAC,GAAGJ,MAAM,CAACI,GAAG,CAAC;IAC3B;EACF,CAAC,CAAC;EAEF,OAAOF,MAAM;AACf;AAEA,SAASI,QAAQA,CAACC,KAAc,EAAoC;EAClE,OAAOA,KAAK,KAAK,IAAI,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC;AAC7E;AAEO,SAASG,mBAAmBA,CAACC,IAAa,EAAE;EACjD,IAAI,CAACL,QAAQ,CAACK,IAAI,CAAC,EAAE;IACnB,OAAOA,IAAI;EACb;EAEA,IAAIC,OAAO,GAAG,KAAK;EACnB,MAAMV,MAA+B,GAAG,CAAC,CAAC;EAC1CW,MAAM,CAACC,OAAO,CAACH,IAAI,CAAC,CAACR,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEG,KAAK,CAAC,KAAK;IAC7C,IAAIA,KAAK,KAAKF,SAAS,EAAE;MACvBH,MAAM,CAACE,GAAG,CAAC,GAAGG,KAAK;MACnBK,OAAO,GAAG,IAAI;IAChB;EACF,CAAC,CAAC;EAEF,OAAOA,OAAO,GAAGV,MAAM,GAAGG,SAAS;AACrC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HostElement } from 'universal-test-renderer';
|
|
1
|
+
import type { HostElement } from 'universal-test-renderer';
|
|
2
2
|
/**
|
|
3
3
|
* pointerEvents controls whether the View can be the target of touch events.
|
|
4
4
|
* 'auto': The View and its children can be the target of touch events.
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isPointerEventEnabled = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
7
8
|
/**
|
|
8
9
|
* pointerEvents controls whether the View can be the target of touch events.
|
|
9
10
|
* 'auto': The View and its children can be the target of touch events.
|
|
@@ -12,13 +13,16 @@ exports.isPointerEventEnabled = void 0;
|
|
|
12
13
|
* 'box-only': The view can be the target of touch events but its subviews cannot be
|
|
13
14
|
* see the official react native doc https://reactnative.dev/docs/view#pointerevents */
|
|
14
15
|
const isPointerEventEnabled = (element, isParent) => {
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
// Check both props.pointerEvents and props.style.pointerEvents
|
|
17
|
+
const pointerEvents = element?.props.pointerEvents ?? _reactNative.StyleSheet.flatten(element?.props.style)?.pointerEvents;
|
|
18
|
+
const parentCondition = isParent ? pointerEvents === 'box-only' : pointerEvents === 'box-none';
|
|
19
|
+
if (pointerEvents === 'none' || parentCondition) {
|
|
17
20
|
return false;
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
if (!element.parent) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
return isPointerEventEnabled(element.parent, true);
|
|
22
26
|
};
|
|
23
27
|
exports.isPointerEventEnabled = isPointerEventEnabled;
|
|
24
28
|
//# sourceMappingURL=pointer-events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pointer-events.js","names":["isPointerEventEnabled","element","isParent","
|
|
1
|
+
{"version":3,"file":"pointer-events.js","names":["_reactNative","require","isPointerEventEnabled","element","isParent","pointerEvents","props","StyleSheet","flatten","style","parentCondition","parent","exports"],"sources":["../../src/helpers/pointer-events.ts"],"sourcesContent":["import { StyleSheet } from 'react-native';\nimport type { HostElement } from 'universal-test-renderer';\n\n/**\n * pointerEvents controls whether the View can be the target of touch events.\n * 'auto': The View and its children can be the target of touch events.\n * 'none': The View is never the target of touch events.\n * 'box-none': The View is never the target of touch events but its subviews can be\n * 'box-only': The view can be the target of touch events but its subviews cannot be\n * see the official react native doc https://reactnative.dev/docs/view#pointerevents */\nexport const isPointerEventEnabled = (element: HostElement, isParent?: boolean): boolean => {\n // Check both props.pointerEvents and props.style.pointerEvents\n const pointerEvents =\n element?.props.pointerEvents ?? StyleSheet.flatten(element?.props.style)?.pointerEvents;\n\n const parentCondition = isParent ? pointerEvents === 'box-only' : pointerEvents === 'box-none';\n\n if (pointerEvents === 'none' || parentCondition) {\n return false;\n }\n\n if (!element.parent) {\n return true;\n }\n\n return isPointerEventEnabled(element.parent, true);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,qBAAqB,GAAGA,CAACC,OAAoB,EAAEC,QAAkB,KAAc;EAC1F;EACA,MAAMC,aAAa,GACjBF,OAAO,EAAEG,KAAK,CAACD,aAAa,IAAIE,uBAAU,CAACC,OAAO,CAACL,OAAO,EAAEG,KAAK,CAACG,KAAK,CAAC,EAAEJ,aAAa;EAEzF,MAAMK,eAAe,GAAGN,QAAQ,GAAGC,aAAa,KAAK,UAAU,GAAGA,aAAa,KAAK,UAAU;EAE9F,IAAIA,aAAa,KAAK,MAAM,IAAIK,eAAe,EAAE;IAC/C,OAAO,KAAK;EACd;EAEA,IAAI,CAACP,OAAO,CAACQ,MAAM,EAAE;IACnB,OAAO,IAAI;EACb;EAEA,OAAOT,qBAAqB,CAACC,OAAO,CAACQ,MAAM,EAAE,IAAI,CAAC;AACpD,CAAC;AAACC,OAAA,CAAAV,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HostElement } from 'universal-test-renderer';
|
|
1
|
+
import type { HostElement } from 'universal-test-renderer';
|
|
2
2
|
export declare function getTextContent(element: HostElement | string | null): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-content.js","names":["getTextContent","element","result","children","forEach","child","push","join"],"sources":["../../src/helpers/text-content.ts"],"sourcesContent":["import { HostElement } from 'universal-test-renderer';\n\nexport function getTextContent(element: HostElement | string | null): string {\n if (!element) {\n return '';\n }\n\n if (typeof element === 'string') {\n return element;\n }\n\n const result: string[] = [];\n element.children?.forEach((child) => {\n result.push(getTextContent(child));\n });\n\n return result.join('');\n}\n"],"mappings":";;;;;;AAEO,SAASA,cAAcA,CAACC,OAAoC,EAAU;EAC3E,IAAI,CAACA,OAAO,EAAE;IACZ,OAAO,EAAE;EACX;EAEA,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IAC/B,OAAOA,OAAO;EAChB;EAEA,MAAMC,MAAgB,GAAG,EAAE;EAC3BD,OAAO,CAACE,QAAQ,EAAEC,OAAO,CAAEC,KAAK,IAAK;IACnCH,MAAM,CAACI,IAAI,CAACN,cAAc,CAACK,KAAK,CAAC,CAAC;EACpC,CAAC,CAAC;EAEF,OAAOH,MAAM,CAACK,IAAI,CAAC,EAAE,CAAC;AACxB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"text-content.js","names":["getTextContent","element","result","children","forEach","child","push","join"],"sources":["../../src/helpers/text-content.ts"],"sourcesContent":["import type { HostElement } from 'universal-test-renderer';\n\nexport function getTextContent(element: HostElement | string | null): string {\n if (!element) {\n return '';\n }\n\n if (typeof element === 'string') {\n return element;\n }\n\n const result: string[] = [];\n element.children?.forEach((child) => {\n result.push(getTextContent(child));\n });\n\n return result.join('');\n}\n"],"mappings":";;;;;;AAEO,SAASA,cAAcA,CAACC,OAAoC,EAAU;EAC3E,IAAI,CAACA,OAAO,EAAE;IACZ,OAAO,EAAE;EACX;EAEA,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IAC/B,OAAOA,OAAO;EAChB;EAEA,MAAMC,MAAgB,GAAG,EAAE;EAC3BD,OAAO,CAACE,QAAQ,EAAEC,OAAO,CAAEC,KAAK,IAAK;IACnCH,MAAM,CAACI,IAAI,CAACN,cAAc,CAACK,KAAK,CAAC,CAAC;EACpC,CAAC,CAAC;EAEF,OAAOH,MAAM,CAACK,IAAI,CAAC,EAAE,CAAC;AACxB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","names":["_nativeState","require","_hostComponentNames","isEditableTextInput","element","isHostTextInput","props","editable","getTextInputValue","Error","type","value","nativeState","valueForElement","get","defaultValue"],"sources":["../../src/helpers/text-input.ts"],"sourcesContent":["import { HostElement } from 'universal-test-renderer';\nimport { nativeState } from '../native-state';\nimport { isHostTextInput } from './host-component-names';\n\nexport function isEditableTextInput(element: HostElement) {\n return isHostTextInput(element) && element.props.editable !== false;\n}\n\nexport function getTextInputValue(element: HostElement) {\n if (!isHostTextInput(element)) {\n throw new Error(`Element is not a \"TextInput\", but it has type \"${element.type}\".`);\n }\n\n return (\n element.props.value ??\n nativeState.valueForElement.get(element) ??\n element.props.defaultValue ??\n ''\n );\n}\n"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"text-input.js","names":["_nativeState","require","_hostComponentNames","isEditableTextInput","element","isHostTextInput","props","editable","getTextInputValue","Error","type","value","nativeState","valueForElement","get","defaultValue"],"sources":["../../src/helpers/text-input.ts"],"sourcesContent":["import type { HostElement } from 'universal-test-renderer';\n\nimport { nativeState } from '../native-state';\nimport { isHostTextInput } from './host-component-names';\n\nexport function isEditableTextInput(element: HostElement) {\n return isHostTextInput(element) && element.props.editable !== false;\n}\n\nexport function getTextInputValue(element: HostElement) {\n if (!isHostTextInput(element)) {\n throw new Error(`Element is not a \"TextInput\", but it has type \"${element.type}\".`);\n }\n\n return (\n element.props.value ??\n nativeState.valueForElement.get(element) ??\n element.props.defaultValue ??\n ''\n );\n}\n"],"mappings":";;;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAEO,SAASE,mBAAmBA,CAACC,OAAoB,EAAE;EACxD,OAAO,IAAAC,mCAAe,EAACD,OAAO,CAAC,IAAIA,OAAO,CAACE,KAAK,CAACC,QAAQ,KAAK,KAAK;AACrE;AAEO,SAASC,iBAAiBA,CAACJ,OAAoB,EAAE;EACtD,IAAI,CAAC,IAAAC,mCAAe,EAACD,OAAO,CAAC,EAAE;IAC7B,MAAM,IAAIK,KAAK,CAAC,kDAAkDL,OAAO,CAACM,IAAI,IAAI,CAAC;EACrF;EAEA,OACEN,OAAO,CAACE,KAAK,CAACK,KAAK,IACnBC,wBAAW,CAACC,eAAe,CAACC,GAAG,CAACV,OAAO,CAAC,IACxCA,OAAO,CAACE,KAAK,CAACS,YAAY,IAC1B,EAAE;AAEN","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare function runWithRealTimers<T>(callback: () => T): T;
|
|
2
2
|
declare const jestFakeTimersAreEnabled: () => boolean;
|
|
3
3
|
declare const clearTimeoutFn: typeof clearTimeout, setImmediateFn: typeof setImmediate, setTimeoutFn: typeof setTimeout;
|
|
4
|
-
export {
|
|
4
|
+
export { clearTimeoutFn as clearTimeout, jestFakeTimersAreEnabled, runWithRealTimers, setImmediateFn as setImmediate, setTimeoutFn as setTimeout, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timers.js","names":["globalObj","window","global","runWithRealTimers","callback","fakeTimersType","getJestFakeTimersType","jest","useRealTimers","callbackReturnValue","fakeTimersConfig","getFakeTimersConfigFromType","useFakeTimers","setTimeout","process","env","RNTL_SKIP_AUTO_DETECT_FAKE_TIMERS","_isMockFunction","clock","getRealSystemTime","type","legacyFakeTimers","jestFakeTimersAreEnabled","Boolean","exports","setImmediatePolyfill","fn","bindTimeFunctions","clearTimeoutFn","clearTimeout","setImmediateFn","setImmediate","setTimeoutFn"],"sources":["../../src/helpers/timers.ts"],"sourcesContent":["// Most content of this file sourced directly from https://github.com/testing-library/dom-testing-library/blob/main/src/helpers.js\n/* globals jest */\nconst globalObj = typeof window === 'undefined' ? global : window;\n\ntype FakeTimersTypes = 'modern' | 'legacy';\n\n// Currently this fn only supports jest timers, but it could support other test runners in the future.\nfunction runWithRealTimers<T>(callback: () => T): T {\n const fakeTimersType = getJestFakeTimersType();\n if (fakeTimersType) {\n jest.useRealTimers();\n }\n\n const callbackReturnValue = callback();\n\n if (fakeTimersType) {\n const fakeTimersConfig = getFakeTimersConfigFromType(fakeTimersType);\n jest.useFakeTimers(fakeTimersConfig);\n }\n\n return callbackReturnValue;\n}\n\nfunction getJestFakeTimersType(): FakeTimersTypes | null {\n // istanbul ignore if\n if (\n typeof jest === 'undefined' ||\n typeof globalObj.setTimeout === 'undefined' ||\n process.env.RNTL_SKIP_AUTO_DETECT_FAKE_TIMERS\n ) {\n return null;\n }\n\n if (\n // @ts-expect-error jest mutates setTimeout\n typeof globalObj.setTimeout._isMockFunction !== 'undefined' &&\n // @ts-expect-error jest mutates setTimeout\n globalObj.setTimeout._isMockFunction\n ) {\n return 'legacy';\n }\n\n if (\n // @ts-expect-error jest mutates setTimeout\n typeof globalObj.setTimeout.clock !== 'undefined' &&\n typeof jest.getRealSystemTime !== 'undefined'\n ) {\n try {\n // jest.getRealSystemTime is only supported for Jest's `modern` fake timers and otherwise throws\n jest.getRealSystemTime();\n return 'modern';\n } catch {\n // not using Jest's modern fake timers\n }\n }\n\n return null;\n}\n\nfunction getFakeTimersConfigFromType(type: FakeTimersTypes) {\n return type === 'legacy' ? { legacyFakeTimers: true } : { legacyFakeTimers: false };\n}\n\nconst jestFakeTimersAreEnabled = (): boolean => Boolean(getJestFakeTimersType());\n\n// we only run our tests in node, and setImmediate is supported in node.\nfunction setImmediatePolyfill(fn:
|
|
1
|
+
{"version":3,"file":"timers.js","names":["globalObj","window","global","runWithRealTimers","callback","fakeTimersType","getJestFakeTimersType","jest","useRealTimers","callbackReturnValue","fakeTimersConfig","getFakeTimersConfigFromType","useFakeTimers","setTimeout","process","env","RNTL_SKIP_AUTO_DETECT_FAKE_TIMERS","_isMockFunction","clock","getRealSystemTime","type","legacyFakeTimers","jestFakeTimersAreEnabled","Boolean","exports","setImmediatePolyfill","fn","bindTimeFunctions","clearTimeoutFn","clearTimeout","setImmediateFn","setImmediate","setTimeoutFn"],"sources":["../../src/helpers/timers.ts"],"sourcesContent":["// Most content of this file sourced directly from https://github.com/testing-library/dom-testing-library/blob/main/src/helpers.js\n/* globals jest */\nconst globalObj = typeof window === 'undefined' ? global : window;\n\ntype FakeTimersTypes = 'modern' | 'legacy';\n\n// Currently this fn only supports jest timers, but it could support other test runners in the future.\nfunction runWithRealTimers<T>(callback: () => T): T {\n const fakeTimersType = getJestFakeTimersType();\n if (fakeTimersType) {\n jest.useRealTimers();\n }\n\n const callbackReturnValue = callback();\n\n if (fakeTimersType) {\n const fakeTimersConfig = getFakeTimersConfigFromType(fakeTimersType);\n jest.useFakeTimers(fakeTimersConfig);\n }\n\n return callbackReturnValue;\n}\n\nfunction getJestFakeTimersType(): FakeTimersTypes | null {\n // istanbul ignore if\n if (\n typeof jest === 'undefined' ||\n typeof globalObj.setTimeout === 'undefined' ||\n process.env.RNTL_SKIP_AUTO_DETECT_FAKE_TIMERS\n ) {\n return null;\n }\n\n if (\n // @ts-expect-error jest mutates setTimeout\n typeof globalObj.setTimeout._isMockFunction !== 'undefined' &&\n // @ts-expect-error jest mutates setTimeout\n globalObj.setTimeout._isMockFunction\n ) {\n return 'legacy';\n }\n\n if (\n // @ts-expect-error jest mutates setTimeout\n typeof globalObj.setTimeout.clock !== 'undefined' &&\n typeof jest.getRealSystemTime !== 'undefined'\n ) {\n try {\n // jest.getRealSystemTime is only supported for Jest's `modern` fake timers and otherwise throws\n jest.getRealSystemTime();\n return 'modern';\n } catch {\n // not using Jest's modern fake timers\n }\n }\n\n return null;\n}\n\nfunction getFakeTimersConfigFromType(type: FakeTimersTypes) {\n return type === 'legacy' ? { legacyFakeTimers: true } : { legacyFakeTimers: false };\n}\n\nconst jestFakeTimersAreEnabled = (): boolean => Boolean(getJestFakeTimersType());\n\n// we only run our tests in node, and setImmediate is supported in node.\nfunction setImmediatePolyfill(fn: () => void) {\n return globalObj.setTimeout(fn, 0);\n}\n\ntype BindTimeFunctions = {\n clearTimeoutFn: typeof clearTimeout;\n setImmediateFn: typeof setImmediate;\n setTimeoutFn: typeof setTimeout;\n};\n\nfunction bindTimeFunctions(): BindTimeFunctions {\n return {\n clearTimeoutFn: globalObj.clearTimeout,\n setImmediateFn: globalObj.setImmediate || setImmediatePolyfill,\n setTimeoutFn: globalObj.setTimeout,\n };\n}\n\nconst { clearTimeoutFn, setImmediateFn, setTimeoutFn } = runWithRealTimers(\n bindTimeFunctions,\n) as BindTimeFunctions;\n\nexport {\n clearTimeoutFn as clearTimeout,\n jestFakeTimersAreEnabled,\n runWithRealTimers,\n setImmediateFn as setImmediate,\n setTimeoutFn as setTimeout,\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AACA,MAAMA,SAAS,GAAG,OAAOC,MAAM,KAAK,WAAW,GAAGC,MAAM,GAAGD,MAAM;AAIjE;AACA,SAASE,iBAAiBA,CAAIC,QAAiB,EAAK;EAClD,MAAMC,cAAc,GAAGC,qBAAqB,CAAC,CAAC;EAC9C,IAAID,cAAc,EAAE;IAClBE,IAAI,CAACC,aAAa,CAAC,CAAC;EACtB;EAEA,MAAMC,mBAAmB,GAAGL,QAAQ,CAAC,CAAC;EAEtC,IAAIC,cAAc,EAAE;IAClB,MAAMK,gBAAgB,GAAGC,2BAA2B,CAACN,cAAc,CAAC;IACpEE,IAAI,CAACK,aAAa,CAACF,gBAAgB,CAAC;EACtC;EAEA,OAAOD,mBAAmB;AAC5B;AAEA,SAASH,qBAAqBA,CAAA,EAA2B;EACvD;EACA,IACE,OAAOC,IAAI,KAAK,WAAW,IAC3B,OAAOP,SAAS,CAACa,UAAU,KAAK,WAAW,IAC3CC,OAAO,CAACC,GAAG,CAACC,iCAAiC,EAC7C;IACA,OAAO,IAAI;EACb;EAEA;EACE;EACA,OAAOhB,SAAS,CAACa,UAAU,CAACI,eAAe,KAAK,WAAW;EAC3D;EACAjB,SAAS,CAACa,UAAU,CAACI,eAAe,EACpC;IACA,OAAO,QAAQ;EACjB;EAEA;EACE;EACA,OAAOjB,SAAS,CAACa,UAAU,CAACK,KAAK,KAAK,WAAW,IACjD,OAAOX,IAAI,CAACY,iBAAiB,KAAK,WAAW,EAC7C;IACA,IAAI;MACF;MACAZ,IAAI,CAACY,iBAAiB,CAAC,CAAC;MACxB,OAAO,QAAQ;IACjB,CAAC,CAAC,MAAM;MACN;IAAA;EAEJ;EAEA,OAAO,IAAI;AACb;AAEA,SAASR,2BAA2BA,CAACS,IAAqB,EAAE;EAC1D,OAAOA,IAAI,KAAK,QAAQ,GAAG;IAAEC,gBAAgB,EAAE;EAAK,CAAC,GAAG;IAAEA,gBAAgB,EAAE;EAAM,CAAC;AACrF;AAEA,MAAMC,wBAAwB,GAAGA,CAAA,KAAeC,OAAO,CAACjB,qBAAqB,CAAC,CAAC,CAAC;;AAEhF;AAAAkB,OAAA,CAAAF,wBAAA,GAAAA,wBAAA;AACA,SAASG,oBAAoBA,CAACC,EAAc,EAAE;EAC5C,OAAO1B,SAAS,CAACa,UAAU,CAACa,EAAE,EAAE,CAAC,CAAC;AACpC;AAQA,SAASC,iBAAiBA,CAAA,EAAsB;EAC9C,OAAO;IACLC,cAAc,EAAE5B,SAAS,CAAC6B,YAAY;IACtCC,cAAc,EAAE9B,SAAS,CAAC+B,YAAY,IAAIN,oBAAoB;IAC9DO,YAAY,EAAEhC,SAAS,CAACa;EAC1B,CAAC;AACH;AAEA,MAAM;EAAEe,cAAc;EAAEE,cAAc;EAAEE;AAAa,CAAC,GAAG7B,iBAAiB,CACxEwB,iBACF,CAAsB;AAACH,OAAA,CAAAX,UAAA,GAAAmB,YAAA;AAAAR,OAAA,CAAAO,YAAA,GAAAD,cAAA;AAAAN,OAAA,CAAAK,YAAA,GAAAD,cAAA","ignoreList":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Run given async callback with temporarily disabled `act` environment and flushes microtasks queue.
|
|
3
|
-
* See: https://github.com/testing-library/react-testing-library/blob/3dcd8a9649e25054c0e650d95fca2317b7008576/src/pure.js#L37
|
|
4
3
|
*
|
|
5
4
|
* @param callback Async callback to run
|
|
6
5
|
* @returns Result of the callback
|
|
@@ -10,7 +10,6 @@ var _flushMicroTasks = require("../flush-micro-tasks");
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Run given async callback with temporarily disabled `act` environment and flushes microtasks queue.
|
|
13
|
-
* See: https://github.com/testing-library/react-testing-library/blob/3dcd8a9649e25054c0e650d95fca2317b7008576/src/pure.js#L37
|
|
14
13
|
*
|
|
15
14
|
* @param callback Async callback to run
|
|
16
15
|
* @returns Result of the callback
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrap-async.js","names":["_act","require","_flushMicroTasks","wrapAsync","callback","previousActEnvironment","getIsReactActEnvironment","setReactActEnvironment","result","flushMicroTasks"],"sources":["../../src/helpers/wrap-async.ts"],"sourcesContent":["/* istanbul ignore file */\n\nimport { getIsReactActEnvironment, setReactActEnvironment } from '../act';\nimport { flushMicroTasks } from '../flush-micro-tasks';\n\n/**\n * Run given async callback with temporarily disabled `act` environment and flushes microtasks queue.\n
|
|
1
|
+
{"version":3,"file":"wrap-async.js","names":["_act","require","_flushMicroTasks","wrapAsync","callback","previousActEnvironment","getIsReactActEnvironment","setReactActEnvironment","result","flushMicroTasks"],"sources":["../../src/helpers/wrap-async.ts"],"sourcesContent":["/* istanbul ignore file */\n\nimport { getIsReactActEnvironment, setReactActEnvironment } from '../act';\nimport { flushMicroTasks } from '../flush-micro-tasks';\n\n/**\n * Run given async callback with temporarily disabled `act` environment and flushes microtasks queue.\n *\n * @param callback Async callback to run\n * @returns Result of the callback\n */\nexport async function wrapAsync<Result>(callback: () => Promise<Result>): Promise<Result> {\n const previousActEnvironment = getIsReactActEnvironment();\n setReactActEnvironment(false);\n\n try {\n const result = await callback();\n // Flush the microtask queue before restoring the `act` environment\n await flushMicroTasks();\n return result;\n } finally {\n setReactActEnvironment(previousActEnvironment);\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAHA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeE,SAASA,CAASC,QAA+B,EAAmB;EACxF,MAAMC,sBAAsB,GAAG,IAAAC,6BAAwB,EAAC,CAAC;EACzD,IAAAC,2BAAsB,EAAC,KAAK,CAAC;EAE7B,IAAI;IACF,MAAMC,MAAM,GAAG,MAAMJ,QAAQ,CAAC,CAAC;IAC/B;IACA,MAAM,IAAAK,gCAAe,EAAC,CAAC;IACvB,OAAOD,MAAM;EACf,CAAC,SAAS;IACR,IAAAD,2BAAsB,EAACF,sBAAsB,CAAC;EAChD;AACF","ignoreList":[]}
|
package/build/index.d.ts
CHANGED
package/build/index.flow.js
CHANGED
|
@@ -55,10 +55,10 @@ declare type A11yRole =
|
|
|
55
55
|
|
|
56
56
|
declare type A11yState = {|
|
|
57
57
|
disabled?: boolean,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
selected?: boolean,
|
|
59
|
+
checked?: boolean | 'mixed',
|
|
60
|
+
busy?: boolean,
|
|
61
|
+
expanded?: boolean,
|
|
62
62
|
|};
|
|
63
63
|
|
|
64
64
|
declare type A11yValue = {
|
|
@@ -86,12 +86,12 @@ interface ByTextQueries {
|
|
|
86
86
|
findByText: (
|
|
87
87
|
text: TextMatch,
|
|
88
88
|
queryOptions?: ByTextOptions,
|
|
89
|
-
waitForOptions?: WaitForOptions
|
|
89
|
+
waitForOptions?: WaitForOptions,
|
|
90
90
|
) => FindReturn;
|
|
91
91
|
findAllByText: (
|
|
92
92
|
text: TextMatch,
|
|
93
93
|
queryOptions?: ByTextOptions,
|
|
94
|
-
waitForOptions?: WaitForOptions
|
|
94
|
+
waitForOptions?: WaitForOptions,
|
|
95
95
|
) => FindAllReturn;
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -105,12 +105,12 @@ interface ByTestIdQueries {
|
|
|
105
105
|
findByTestId: (
|
|
106
106
|
testID: TextMatch,
|
|
107
107
|
queryOptions?: ByTestIdOptions,
|
|
108
|
-
waitForOptions?: WaitForOptions
|
|
108
|
+
waitForOptions?: WaitForOptions,
|
|
109
109
|
) => FindReturn;
|
|
110
110
|
findAllByTestId: (
|
|
111
111
|
testID: TextMatch,
|
|
112
112
|
queryOptions?: ByTestIdOptions,
|
|
113
|
-
waitForOptions?: WaitForOptions
|
|
113
|
+
waitForOptions?: WaitForOptions,
|
|
114
114
|
) => FindAllReturn;
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -120,25 +120,25 @@ interface ByDisplayValueQueries {
|
|
|
120
120
|
getByDisplayValue: (value: TextMatch, options?: ByDisplayValueOptions) => ReactTestInstance;
|
|
121
121
|
getAllByDisplayValue: (
|
|
122
122
|
value: TextMatch,
|
|
123
|
-
options?: ByDisplayValueOptions
|
|
123
|
+
options?: ByDisplayValueOptions,
|
|
124
124
|
) => Array<ReactTestInstance>;
|
|
125
125
|
queryByDisplayValue: (
|
|
126
126
|
value: TextMatch,
|
|
127
|
-
options?: ByDisplayValueOptions
|
|
127
|
+
options?: ByDisplayValueOptions,
|
|
128
128
|
) => ReactTestInstance | null;
|
|
129
129
|
queryAllByDisplayValue: (
|
|
130
130
|
value: TextMatch,
|
|
131
|
-
options?: ByDisplayValueOptions
|
|
131
|
+
options?: ByDisplayValueOptions,
|
|
132
132
|
) => Array<ReactTestInstance> | [];
|
|
133
133
|
findByDisplayValue: (
|
|
134
134
|
value: TextMatch,
|
|
135
135
|
queryOptions?: ByDisplayValueOptions,
|
|
136
|
-
waitForOptions?: WaitForOptions
|
|
136
|
+
waitForOptions?: WaitForOptions,
|
|
137
137
|
) => FindReturn;
|
|
138
138
|
findAllByDisplayValue: (
|
|
139
139
|
value: TextMatch,
|
|
140
140
|
queryOptions?: ByDisplayValueOptions,
|
|
141
|
-
waitForOptions?: WaitForOptions
|
|
141
|
+
waitForOptions?: WaitForOptions,
|
|
142
142
|
) => FindAllReturn;
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -147,29 +147,29 @@ type ByPlaceholderTextOptions = CommonQueryOptions & TextMatchOptions;
|
|
|
147
147
|
interface ByPlaceholderTextQueries {
|
|
148
148
|
getByPlaceholderText: (
|
|
149
149
|
placeholder: TextMatch,
|
|
150
|
-
options?: ByPlaceholderTextOptions
|
|
150
|
+
options?: ByPlaceholderTextOptions,
|
|
151
151
|
) => ReactTestInstance;
|
|
152
152
|
getAllByPlaceholderText: (
|
|
153
153
|
placeholder: TextMatch,
|
|
154
|
-
options?: ByPlaceholderTextOptions
|
|
154
|
+
options?: ByPlaceholderTextOptions,
|
|
155
155
|
) => Array<ReactTestInstance>;
|
|
156
156
|
queryByPlaceholderText: (
|
|
157
157
|
placeholder: TextMatch,
|
|
158
|
-
options?: ByPlaceholderTextOptions
|
|
158
|
+
options?: ByPlaceholderTextOptions,
|
|
159
159
|
) => ReactTestInstance | null;
|
|
160
160
|
queryAllByPlaceholderText: (
|
|
161
161
|
placeholder: TextMatch,
|
|
162
|
-
options?: ByPlaceholderTextOptions
|
|
162
|
+
options?: ByPlaceholderTextOptions,
|
|
163
163
|
) => Array<ReactTestInstance> | [];
|
|
164
164
|
findByPlaceholderText: (
|
|
165
165
|
placeholder: TextMatch,
|
|
166
166
|
queryOptions?: ByPlaceholderTextOptions,
|
|
167
|
-
waitForOptions?: WaitForOptions
|
|
167
|
+
waitForOptions?: WaitForOptions,
|
|
168
168
|
) => FindReturn;
|
|
169
169
|
findAllByPlaceholderText: (
|
|
170
170
|
placeholder: TextMatch,
|
|
171
171
|
queryOptions?: ByPlaceholderTextOptions,
|
|
172
|
-
waitForOptions?: WaitForOptions
|
|
172
|
+
waitForOptions?: WaitForOptions,
|
|
173
173
|
) => FindAllReturn;
|
|
174
174
|
}
|
|
175
175
|
|
|
@@ -205,12 +205,12 @@ interface A11yAPI {
|
|
|
205
205
|
findByLabelText: (
|
|
206
206
|
matcher: TextMatch,
|
|
207
207
|
queryOptions?: ByLabelTextOptions,
|
|
208
|
-
waitForOptions?: WaitForOptions
|
|
208
|
+
waitForOptions?: WaitForOptions,
|
|
209
209
|
) => FindReturn;
|
|
210
210
|
findAllByLabelText: (
|
|
211
211
|
matcher: TextMatch,
|
|
212
212
|
queryOptions?: ByLabelTextOptions,
|
|
213
|
-
waitForOptions?: WaitForOptions
|
|
213
|
+
waitForOptions?: WaitForOptions,
|
|
214
214
|
) => FindAllReturn;
|
|
215
215
|
|
|
216
216
|
// Hint
|
|
@@ -225,22 +225,22 @@ interface A11yAPI {
|
|
|
225
225
|
findByA11yHint: (
|
|
226
226
|
matcher: TextMatch,
|
|
227
227
|
queryOptions?: ByHintTextOptions,
|
|
228
|
-
waitForOptions?: WaitForOptions
|
|
228
|
+
waitForOptions?: WaitForOptions,
|
|
229
229
|
) => FindReturn;
|
|
230
230
|
findByHintText: (
|
|
231
231
|
matcher: TextMatch,
|
|
232
232
|
queryOptions?: ByHintTextOptions,
|
|
233
|
-
waitForOptions?: WaitForOptions
|
|
233
|
+
waitForOptions?: WaitForOptions,
|
|
234
234
|
) => FindReturn;
|
|
235
235
|
findAllByA11yHint: (
|
|
236
236
|
matcher: TextMatch,
|
|
237
237
|
queryOptions?: ByHintTextOptions,
|
|
238
|
-
waitForOptions?: WaitForOptions
|
|
238
|
+
waitForOptions?: WaitForOptions,
|
|
239
239
|
) => FindAllReturn;
|
|
240
240
|
findAllByHintText: (
|
|
241
241
|
matcher: TextMatch,
|
|
242
242
|
queryOptions?: ByHintTextOptions,
|
|
243
|
-
waitForOptions?: WaitForOptions
|
|
243
|
+
waitForOptions?: WaitForOptions,
|
|
244
244
|
) => FindAllReturn;
|
|
245
245
|
|
|
246
246
|
// Role
|
|
@@ -251,12 +251,12 @@ interface A11yAPI {
|
|
|
251
251
|
findByRole: (
|
|
252
252
|
matcher: A11yRole | RegExp,
|
|
253
253
|
queryOptions?: ByRoleOptions,
|
|
254
|
-
waitForOptions?: WaitForOptions
|
|
254
|
+
waitForOptions?: WaitForOptions,
|
|
255
255
|
) => FindReturn;
|
|
256
256
|
findAllByRole: (
|
|
257
257
|
matcher: A11yRole | RegExp,
|
|
258
258
|
queryOptions?: ByRoleOptions,
|
|
259
|
-
waitForOptions?: WaitForOptions
|
|
259
|
+
waitForOptions?: WaitForOptions,
|
|
260
260
|
) => FindAllReturn;
|
|
261
261
|
}
|
|
262
262
|
|
|
@@ -266,7 +266,7 @@ interface Thenable {
|
|
|
266
266
|
|
|
267
267
|
type MapPropsFunction = (
|
|
268
268
|
props: { [string]: mixed },
|
|
269
|
-
node: ReactTestRendererJSON
|
|
269
|
+
node: ReactTestRendererJSON,
|
|
270
270
|
) => { [string]: mixed };
|
|
271
271
|
|
|
272
272
|
type DebugOptions = {
|
|
@@ -274,10 +274,6 @@ type DebugOptions = {
|
|
|
274
274
|
mapProps?: MapPropsFunction,
|
|
275
275
|
};
|
|
276
276
|
|
|
277
|
-
type Debug = {
|
|
278
|
-
(options?: DebugOptions | string): void,
|
|
279
|
-
};
|
|
280
|
-
|
|
281
277
|
type Queries = ByTextQueries &
|
|
282
278
|
ByTestIdQueries &
|
|
283
279
|
ByDisplayValueQueries &
|
|
@@ -304,7 +300,7 @@ declare module '@testing-library/react-native' {
|
|
|
304
300
|
rerender(nextElement: React.Element<any>): void;
|
|
305
301
|
unmount(nextElement?: React.Element<any>): void;
|
|
306
302
|
toJSON(): ReactTestRendererJSON[] | ReactTestRendererJSON | null;
|
|
307
|
-
debug:
|
|
303
|
+
debug(options?: DebugOptions): void;
|
|
308
304
|
root: ReactTestInstance;
|
|
309
305
|
UNSAFE_root: ReactTestInstance;
|
|
310
306
|
}
|
|
@@ -314,6 +310,7 @@ declare module '@testing-library/react-native' {
|
|
|
314
310
|
declare interface RenderOptions {
|
|
315
311
|
wrapper?: React.ComponentType<any>;
|
|
316
312
|
createNodeMock?: (element: React.Element<any>) => any;
|
|
313
|
+
unstable_validateStringsRenderedWithinText?: boolean;
|
|
317
314
|
unstable_isConcurrent?: boolean;
|
|
318
315
|
unstable_strictMode?: boolean;
|
|
319
316
|
unstable_concurrentUpdatesByDefault?: boolean;
|
|
@@ -321,7 +318,7 @@ declare module '@testing-library/react-native' {
|
|
|
321
318
|
|
|
322
319
|
declare export var render: (
|
|
323
320
|
component: React.Element<any>,
|
|
324
|
-
options?: RenderOptions
|
|
321
|
+
options?: RenderOptions,
|
|
325
322
|
) => RenderResult;
|
|
326
323
|
|
|
327
324
|
declare export var screen: RenderResult;
|
|
@@ -333,7 +330,7 @@ declare module '@testing-library/react-native' {
|
|
|
333
330
|
|
|
334
331
|
declare type WaitForElementToBeRemovedFunction = <T = any>(
|
|
335
332
|
expectation: () => T,
|
|
336
|
-
options?: WaitForOptions
|
|
333
|
+
options?: WaitForOptions,
|
|
337
334
|
) => Promise<T>;
|
|
338
335
|
|
|
339
336
|
declare export var waitForElementToBeRemoved: WaitForElementToBeRemovedFunction;
|
|
@@ -374,7 +371,7 @@ declare module '@testing-library/react-native' {
|
|
|
374
371
|
|
|
375
372
|
declare type RenderHookFunction = <Result, Props>(
|
|
376
373
|
renderCallback: (props: Props) => Result,
|
|
377
|
-
options?: RenderHookOptions<Props
|
|
374
|
+
options?: RenderHookOptions<Props>,
|
|
378
375
|
) => RenderHookResult<Result, Props>;
|
|
379
376
|
|
|
380
377
|
declare export var renderHook: RenderHookFunction;
|
package/build/index.js
CHANGED
|
@@ -3,20 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "HostElement", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () {
|
|
12
|
-
return _universalTestRenderer.HostElement;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
var _universalTestRenderer = require("universal-test-renderer");
|
|
6
|
+
require("./matchers/extend-expect");
|
|
7
|
+
var _act = require("./act");
|
|
8
|
+
var _flushMicroTasks = require("./flush-micro-tasks");
|
|
16
9
|
var _pure = require("./pure");
|
|
17
10
|
Object.keys(_pure).forEach(function (key) {
|
|
18
11
|
if (key === "default" || key === "__esModule") return;
|
|
19
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
20
12
|
if (key in exports && exports[key] === _pure[key]) return;
|
|
21
13
|
Object.defineProperty(exports, key, {
|
|
22
14
|
enumerable: true,
|
|
@@ -25,9 +17,6 @@ Object.keys(_pure).forEach(function (key) {
|
|
|
25
17
|
}
|
|
26
18
|
});
|
|
27
19
|
});
|
|
28
|
-
var _flushMicroTasks = require("./flush-micro-tasks");
|
|
29
|
-
var _act = require("./act");
|
|
30
|
-
require("./matchers/extend-expect");
|
|
31
20
|
if (!process?.env?.RNTL_SKIP_AUTO_CLEANUP) {
|
|
32
21
|
// If we're running in a test runner that supports afterEach
|
|
33
22
|
// then we'll automatically run cleanup afterEach test
|
|
@@ -35,10 +24,9 @@ if (!process?.env?.RNTL_SKIP_AUTO_CLEANUP) {
|
|
|
35
24
|
// if you don't like this then either import the `pure` module
|
|
36
25
|
// or set the RNTL_SKIP_AUTO_CLEANUP env variable to 'true'.
|
|
37
26
|
if (typeof afterEach === 'function') {
|
|
38
|
-
// eslint-disable-next-line no-undef
|
|
39
27
|
afterEach(async () => {
|
|
40
28
|
await (0, _flushMicroTasks.flushMicroTasks)();
|
|
41
|
-
(0, _pure.
|
|
29
|
+
await (0, _pure.cleanupAsync)();
|
|
42
30
|
});
|
|
43
31
|
}
|
|
44
32
|
if (typeof beforeAll === 'function' && typeof afterAll === 'function') {
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["require","_act","_flushMicroTasks","_pure","Object","keys","forEach","key","exports","defineProperty","enumerable","get","process","env","RNTL_SKIP_AUTO_CLEANUP","afterEach","flushMicroTasks","cleanupAsync","beforeAll","afterAll","previousIsReactActEnvironment","getIsReactActEnvironment","setReactActEnvironment"],"sources":["../src/index.ts"],"sourcesContent":["import './matchers/extend-expect';\n\nimport { getIsReactActEnvironment, setReactActEnvironment } from './act';\nimport { flushMicroTasks } from './flush-micro-tasks';\nimport { cleanupAsync } from './pure';\n\nif (!process?.env?.RNTL_SKIP_AUTO_CLEANUP) {\n // If we're running in a test runner that supports afterEach\n // then we'll automatically run cleanup afterEach test\n // this ensures that tests run in isolation from each other\n // if you don't like this then either import the `pure` module\n // or set the RNTL_SKIP_AUTO_CLEANUP env variable to 'true'.\n if (typeof afterEach === 'function') {\n afterEach(async () => {\n await flushMicroTasks();\n await cleanupAsync();\n });\n }\n\n if (typeof beforeAll === 'function' && typeof afterAll === 'function') {\n // This matches the behavior of React < 18.\n let previousIsReactActEnvironment = getIsReactActEnvironment();\n beforeAll(() => {\n previousIsReactActEnvironment = getIsReactActEnvironment();\n setReactActEnvironment(true);\n });\n\n afterAll(() => {\n setReactActEnvironment(previousIsReactActEnvironment);\n });\n }\n}\n\nexport * from './pure';\n"],"mappings":";;;;;AAAAA,OAAA;AAEA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AA6BAI,MAAA,CAAAC,IAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAR,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AA3BA,IAAI,CAACK,OAAO,EAAEC,GAAG,EAAEC,sBAAsB,EAAE;EACzC;EACA;EACA;EACA;EACA;EACA,IAAI,OAAOC,SAAS,KAAK,UAAU,EAAE;IACnCA,SAAS,CAAC,YAAY;MACpB,MAAM,IAAAC,gCAAe,EAAC,CAAC;MACvB,MAAM,IAAAC,kBAAY,EAAC,CAAC;IACtB,CAAC,CAAC;EACJ;EAEA,IAAI,OAAOC,SAAS,KAAK,UAAU,IAAI,OAAOC,QAAQ,KAAK,UAAU,EAAE;IACrE;IACA,IAAIC,6BAA6B,GAAG,IAAAC,6BAAwB,EAAC,CAAC;IAC9DH,SAAS,CAAC,MAAM;MACdE,6BAA6B,GAAG,IAAAC,6BAAwB,EAAC,CAAC;MAC1D,IAAAC,2BAAsB,EAAC,IAAI,CAAC;IAC9B,CAAC,CAAC;IAEFH,QAAQ,CAAC,MAAM;MACb,IAAAG,2BAAsB,EAACF,6BAA6B,CAAC;IACvD,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _toBeBusy = require("./to-be-busy");
|
|
4
4
|
var _toBeChecked = require("./to-be-checked");
|
|
5
5
|
var _toBeDisabled = require("./to-be-disabled");
|
|
6
|
-
var _toBeBusy = require("./to-be-busy");
|
|
7
6
|
var _toBeEmptyElement = require("./to-be-empty-element");
|
|
8
7
|
var _toBeExpanded = require("./to-be-expanded");
|
|
8
|
+
var _toBeOnTheScreen = require("./to-be-on-the-screen");
|
|
9
9
|
var _toBePartiallyChecked = require("./to-be-partially-checked");
|
|
10
10
|
var _toBeSelected = require("./to-be-selected");
|
|
11
11
|
var _toBeVisible = require("./to-be-visible");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extend-expect.js","names":["
|
|
1
|
+
{"version":3,"file":"extend-expect.js","names":["_toBeBusy","require","_toBeChecked","_toBeDisabled","_toBeEmptyElement","_toBeExpanded","_toBeOnTheScreen","_toBePartiallyChecked","_toBeSelected","_toBeVisible","_toContainElement","_toHaveAccessibilityValue","_toHaveAccessibleName","_toHaveDisplayValue","_toHaveProp","_toHaveStyle","_toHaveTextContent","expect","extend","toBeOnTheScreen","toBeChecked","toBeCollapsed","toBeDisabled","toBeBusy","toBeEmptyElement","toBeEnabled","toBeExpanded","toBePartiallyChecked","toBeSelected","toBeVisible","toContainElement","toHaveAccessibilityValue","toHaveAccessibleName","toHaveDisplayValue","toHaveProp","toHaveStyle","toHaveTextContent"],"sources":["../../src/matchers/extend-expect.ts"],"sourcesContent":["import { toBeBusy } from './to-be-busy';\nimport { toBeChecked } from './to-be-checked';\nimport { toBeDisabled, toBeEnabled } from './to-be-disabled';\nimport { toBeEmptyElement } from './to-be-empty-element';\nimport { toBeCollapsed, toBeExpanded } from './to-be-expanded';\nimport { toBeOnTheScreen } from './to-be-on-the-screen';\nimport { toBePartiallyChecked } from './to-be-partially-checked';\nimport { toBeSelected } from './to-be-selected';\nimport { toBeVisible } from './to-be-visible';\nimport { toContainElement } from './to-contain-element';\nimport { toHaveAccessibilityValue } from './to-have-accessibility-value';\nimport { toHaveAccessibleName } from './to-have-accessible-name';\nimport { toHaveDisplayValue } from './to-have-display-value';\nimport { toHaveProp } from './to-have-prop';\nimport { toHaveStyle } from './to-have-style';\nimport { toHaveTextContent } from './to-have-text-content';\n\nexport type * from './types';\n\nexpect.extend({\n toBeOnTheScreen,\n toBeChecked,\n toBeCollapsed,\n toBeDisabled,\n toBeBusy,\n toBeEmptyElement,\n toBeEnabled,\n toBeExpanded,\n toBePartiallyChecked,\n toBeSelected,\n toBeVisible,\n toContainElement,\n toHaveAccessibilityValue,\n toHaveAccessibleName,\n toHaveDisplayValue,\n toHaveProp,\n toHaveStyle,\n toHaveTextContent,\n});\n"],"mappings":";;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,iBAAA,GAAAT,OAAA;AACA,IAAAU,yBAAA,GAAAV,OAAA;AACA,IAAAW,qBAAA,GAAAX,OAAA;AACA,IAAAY,mBAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AACA,IAAAe,kBAAA,GAAAf,OAAA;AAIAgB,MAAM,CAACC,MAAM,CAAC;EACZC,eAAe,EAAfA,gCAAe;EACfC,WAAW,EAAXA,wBAAW;EACXC,aAAa,EAAbA,2BAAa;EACbC,YAAY,EAAZA,0BAAY;EACZC,QAAQ,EAARA,kBAAQ;EACRC,gBAAgB,EAAhBA,kCAAgB;EAChBC,WAAW,EAAXA,yBAAW;EACXC,YAAY,EAAZA,0BAAY;EACZC,oBAAoB,EAApBA,0CAAoB;EACpBC,YAAY,EAAZA,0BAAY;EACZC,WAAW,EAAXA,wBAAW;EACXC,gBAAgB,EAAhBA,kCAAgB;EAChBC,wBAAwB,EAAxBA,kDAAwB;EACxBC,oBAAoB,EAApBA,0CAAoB;EACpBC,kBAAkB,EAAlBA,sCAAkB;EAClBC,UAAU,EAAVA,sBAAU;EACVC,WAAW,EAAXA,wBAAW;EACXC,iBAAiB,EAAjBA;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@ export { toBeBusy } from './to-be-busy';
|
|
|
2
2
|
export { toBeChecked } from './to-be-checked';
|
|
3
3
|
export { toBeDisabled, toBeEnabled } from './to-be-disabled';
|
|
4
4
|
export { toBeEmptyElement } from './to-be-empty-element';
|
|
5
|
-
export {
|
|
5
|
+
export { toBeCollapsed, toBeExpanded } from './to-be-expanded';
|
|
6
6
|
export { toBeOnTheScreen } from './to-be-on-the-screen';
|
|
7
7
|
export { toBePartiallyChecked } from './to-be-partially-checked';
|
|
8
8
|
export { toBeSelected } from './to-be-selected';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_toBeBusy","require","_toBeChecked","_toBeDisabled","_toBeEmptyElement","_toBeExpanded","_toBeOnTheScreen","_toBePartiallyChecked","_toBeSelected","_toBeVisible","_toContainElement","_toHaveAccessibilityValue","_toHaveAccessibleName","_toHaveDisplayValue","_toHaveProp","_toHaveStyle","_toHaveTextContent"],"sources":["../../src/matchers/index.ts"],"sourcesContent":["export { toBeBusy } from './to-be-busy';\nexport { toBeChecked } from './to-be-checked';\nexport { toBeDisabled, toBeEnabled } from './to-be-disabled';\nexport { toBeEmptyElement } from './to-be-empty-element';\nexport {
|
|
1
|
+
{"version":3,"file":"index.js","names":["_toBeBusy","require","_toBeChecked","_toBeDisabled","_toBeEmptyElement","_toBeExpanded","_toBeOnTheScreen","_toBePartiallyChecked","_toBeSelected","_toBeVisible","_toContainElement","_toHaveAccessibilityValue","_toHaveAccessibleName","_toHaveDisplayValue","_toHaveProp","_toHaveStyle","_toHaveTextContent"],"sources":["../../src/matchers/index.ts"],"sourcesContent":["export { toBeBusy } from './to-be-busy';\nexport { toBeChecked } from './to-be-checked';\nexport { toBeDisabled, toBeEnabled } from './to-be-disabled';\nexport { toBeEmptyElement } from './to-be-empty-element';\nexport { toBeCollapsed, toBeExpanded } from './to-be-expanded';\nexport { toBeOnTheScreen } from './to-be-on-the-screen';\nexport { toBePartiallyChecked } from './to-be-partially-checked';\nexport { toBeSelected } from './to-be-selected';\nexport { toBeVisible } from './to-be-visible';\nexport { toContainElement } from './to-contain-element';\nexport { toHaveAccessibilityValue } from './to-have-accessibility-value';\nexport { toHaveAccessibleName } from './to-have-accessible-name';\nexport { toHaveDisplayValue } from './to-have-display-value';\nexport { toHaveProp } from './to-have-prop';\nexport { toHaveStyle } from './to-have-style';\nexport { toHaveTextContent } from './to-have-text-content';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,iBAAA,GAAAT,OAAA;AACA,IAAAU,yBAAA,GAAAV,OAAA;AACA,IAAAW,qBAAA,GAAAX,OAAA;AACA,IAAAY,mBAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AACA,IAAAe,kBAAA,GAAAf,OAAA","ignoreList":[]}
|