@testing-library/react-native 12.4.5 → 12.5.0

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.
Files changed (155) hide show
  1. package/README.md +10 -7
  2. package/build/act.js.map +1 -1
  3. package/build/cleanup.js.map +1 -1
  4. package/build/config.js.map +1 -1
  5. package/build/fire-event.d.ts +3 -3
  6. package/build/fire-event.js +1 -3
  7. package/build/fire-event.js.map +1 -1
  8. package/build/flush-micro-tasks.js.map +1 -1
  9. package/build/helpers/{accessiblity.d.ts → accessibility.d.ts} +1 -1
  10. package/build/helpers/{accessiblity.js → accessibility.js} +3 -3
  11. package/build/helpers/accessibility.js.map +1 -0
  12. package/build/helpers/component-tree.js.map +1 -1
  13. package/build/helpers/debug-deep.js.map +1 -1
  14. package/build/helpers/debug-shallow.js.map +1 -1
  15. package/build/helpers/deprecation.js.map +1 -1
  16. package/build/helpers/errors.js.map +1 -1
  17. package/build/helpers/find-all.js +2 -2
  18. package/build/helpers/find-all.js.map +1 -1
  19. package/build/helpers/format-default.js.map +1 -1
  20. package/build/helpers/format.js +1 -1
  21. package/build/helpers/format.js.map +1 -1
  22. package/build/helpers/host-component-names.js +1 -1
  23. package/build/helpers/host-component-names.js.map +1 -1
  24. package/build/helpers/matchers/match-accessibility-state.js +3 -3
  25. package/build/helpers/matchers/match-accessibility-state.js.map +1 -1
  26. package/build/helpers/matchers/match-accessibility-value.js +2 -2
  27. package/build/helpers/matchers/match-accessibility-value.js.map +1 -1
  28. package/build/helpers/matchers/match-array-prop.js.map +1 -1
  29. package/build/helpers/matchers/match-label-text.js +3 -3
  30. package/build/helpers/matchers/match-label-text.js.map +1 -1
  31. package/build/helpers/matchers/match-object-prop.js.map +1 -1
  32. package/build/helpers/matchers/match-string-prop.js.map +1 -1
  33. package/build/helpers/matchers/match-text-content.js.map +1 -1
  34. package/build/helpers/object.js.map +1 -1
  35. package/build/helpers/pointer-events.js.map +1 -1
  36. package/build/helpers/query-name.js.map +1 -1
  37. package/build/helpers/string-validation.js.map +1 -1
  38. package/build/helpers/text-content.js.map +1 -1
  39. package/build/helpers/text-input.js.map +1 -1
  40. package/build/helpers/timers.js.map +1 -1
  41. package/build/helpers/wrap-async.js +4 -3
  42. package/build/helpers/wrap-async.js.map +1 -1
  43. package/build/index.flow.js +3 -0
  44. package/build/index.js.map +1 -1
  45. package/build/matchers/extend-expect.js.map +1 -1
  46. package/build/matchers/index.js.map +1 -1
  47. package/build/matchers/to-be-busy.js +2 -2
  48. package/build/matchers/to-be-busy.js.map +1 -1
  49. package/build/matchers/to-be-checked.js +4 -4
  50. package/build/matchers/to-be-checked.js.map +1 -1
  51. package/build/matchers/to-be-collapsed.js +2 -2
  52. package/build/matchers/to-be-collapsed.js.map +1 -1
  53. package/build/matchers/to-be-disabled.js.map +1 -1
  54. package/build/matchers/to-be-empty-element.js.map +1 -1
  55. package/build/matchers/to-be-expanded.js +2 -2
  56. package/build/matchers/to-be-expanded.js.map +1 -1
  57. package/build/matchers/to-be-on-the-screen.js.map +1 -1
  58. package/build/matchers/to-be-partially-checked.js +4 -4
  59. package/build/matchers/to-be-partially-checked.js.map +1 -1
  60. package/build/matchers/to-be-selected.js +2 -2
  61. package/build/matchers/to-be-selected.js.map +1 -1
  62. package/build/matchers/to-be-visible.js +2 -2
  63. package/build/matchers/to-be-visible.js.map +1 -1
  64. package/build/matchers/to-contain-element.js.map +1 -1
  65. package/build/matchers/to-have-accessibility-value.js +2 -2
  66. package/build/matchers/to-have-accessibility-value.js.map +1 -1
  67. package/build/matchers/to-have-accessible-name.js +2 -2
  68. package/build/matchers/to-have-accessible-name.js.map +1 -1
  69. package/build/matchers/to-have-display-value.js.map +1 -1
  70. package/build/matchers/to-have-prop.js.map +1 -1
  71. package/build/matchers/to-have-style.js.map +1 -1
  72. package/build/matchers/to-have-text-content.js.map +1 -1
  73. package/build/matchers/types.js.map +1 -1
  74. package/build/matchers/utils.js +1 -1
  75. package/build/matchers/utils.js.map +1 -1
  76. package/build/matches.js.map +1 -1
  77. package/build/pure.d.ts +1 -1
  78. package/build/pure.js +3 -3
  79. package/build/pure.js.map +1 -1
  80. package/build/queries/accessibility-state.js +2 -2
  81. package/build/queries/accessibility-state.js.map +1 -1
  82. package/build/queries/accessibility-value.js +2 -2
  83. package/build/queries/accessibility-value.js.map +1 -1
  84. package/build/queries/display-value.js.map +1 -1
  85. package/build/queries/hint-text.js.map +1 -1
  86. package/build/queries/label-text.js.map +1 -1
  87. package/build/queries/make-queries.js.map +1 -1
  88. package/build/queries/options.js.map +1 -1
  89. package/build/queries/placeholder-text.js.map +1 -1
  90. package/build/queries/role.d.ts +10 -8
  91. package/build/queries/role.js +4 -4
  92. package/build/queries/role.js.map +1 -1
  93. package/build/queries/test-id.js.map +1 -1
  94. package/build/queries/text.js.map +1 -1
  95. package/build/queries/unsafe-props.js.map +1 -1
  96. package/build/queries/unsafe-type.js.map +1 -1
  97. package/build/react-versions.js +1 -1
  98. package/build/react-versions.js.map +1 -1
  99. package/build/render-act.d.ts +1 -1
  100. package/build/render-act.js +4 -2
  101. package/build/render-act.js.map +1 -1
  102. package/build/render-hook.js.map +1 -1
  103. package/build/render.d.ts +14 -50
  104. package/build/render.js +16 -18
  105. package/build/render.js.map +1 -1
  106. package/build/screen.js.map +1 -1
  107. package/build/shallow.js +1 -1
  108. package/build/shallow.js.map +1 -1
  109. package/build/test-utils/events.js.map +1 -1
  110. package/build/test-utils/index.js.map +1 -1
  111. package/build/types.d.ts +1 -0
  112. package/build/types.js +2 -0
  113. package/build/types.js.map +1 -0
  114. package/build/user-event/clear.js.map +1 -1
  115. package/build/user-event/event-builder/base.d.ts +3 -0
  116. package/build/user-event/event-builder/base.js +22 -0
  117. package/build/user-event/event-builder/base.js.map +1 -0
  118. package/build/user-event/event-builder/common.d.ts +67 -10
  119. package/build/user-event/event-builder/common.js +7 -9
  120. package/build/user-event/event-builder/common.js.map +1 -1
  121. package/build/user-event/event-builder/index.d.ts +179 -26
  122. package/build/user-event/event-builder/index.js.map +1 -1
  123. package/build/user-event/event-builder/scroll-view.d.ts +14 -2
  124. package/build/user-event/event-builder/scroll-view.js +3 -3
  125. package/build/user-event/event-builder/scroll-view.js.map +1 -1
  126. package/build/user-event/event-builder/text-input.d.ts +98 -14
  127. package/build/user-event/event-builder/text-input.js +15 -21
  128. package/build/user-event/event-builder/text-input.js.map +1 -1
  129. package/build/user-event/index.js.map +1 -1
  130. package/build/user-event/press/constants.js.map +1 -1
  131. package/build/user-event/press/index.js.map +1 -1
  132. package/build/user-event/press/press.js +5 -1
  133. package/build/user-event/press/press.js.map +1 -1
  134. package/build/user-event/scroll/index.js.map +1 -1
  135. package/build/user-event/scroll/scroll-to.js.map +1 -1
  136. package/build/user-event/scroll/state.js.map +1 -1
  137. package/build/user-event/scroll/utils.js.map +1 -1
  138. package/build/user-event/setup/index.js.map +1 -1
  139. package/build/user-event/setup/setup.js.map +1 -1
  140. package/build/user-event/type/index.js.map +1 -1
  141. package/build/user-event/type/parse-keys.js.map +1 -1
  142. package/build/user-event/type/type.js.map +1 -1
  143. package/build/user-event/utils/content-size.js.map +1 -1
  144. package/build/user-event/utils/dispatch-event.js.map +1 -1
  145. package/build/user-event/utils/index.js.map +1 -1
  146. package/build/user-event/utils/text-range.js.map +1 -1
  147. package/build/user-event/utils/wait.js.map +1 -1
  148. package/build/user-event/utils/warn-about-real-timers.js.map +1 -1
  149. package/build/wait-for-element-to-be-removed.js.map +1 -1
  150. package/build/wait-for.js.map +1 -1
  151. package/build/within.d.ts +6 -24
  152. package/build/within.js.map +1 -1
  153. package/package.json +12 -12
  154. package/typings/index.flow.js +3 -0
  155. package/build/helpers/accessiblity.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"to-be-visible.js","names":["_jestMatcherUtils","require","_reactNative","_accessiblity","_componentTree","_hostComponentNames","_utils","toBeVisible","element","isNot","checkHostElement","pass","isElementVisible","message","is","matcherHint","formatElement","join","accessibilityCache","cache","WeakMap","isHiddenFromAccessibility","isHiddenForStyles","isHostModal","props","visible","hostParent","getHostParent","style","display","opacity","StyleSheet","flatten"],"sources":["../../src/matchers/to-be-visible.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint } from 'jest-matcher-utils';\nimport { StyleSheet } from 'react-native';\nimport { isHiddenFromAccessibility } from '../helpers/accessiblity';\nimport { getHostParent } from '../helpers/component-tree';\nimport { isHostModal } from '../helpers/host-component-names';\nimport { checkHostElement, formatElement } from './utils';\n\nexport function toBeVisible(this: jest.MatcherContext, element: ReactTestInstance) {\n if (element !== null || !this.isNot) {\n checkHostElement(element, toBeVisible, this);\n }\n\n return {\n pass: isElementVisible(element),\n message: () => {\n const is = this.isNot ? 'is' : 'is not';\n return [\n matcherHint(`${this.isNot ? '.not' : ''}.toBeVisible`, 'element', ''),\n '',\n `Received element ${is} visible:`,\n formatElement(element),\n ].join('\\n');\n },\n };\n}\n\nfunction isElementVisible(\n element: ReactTestInstance,\n accessibilityCache?: WeakMap<ReactTestInstance, boolean>,\n): boolean {\n // Use cache to speed up repeated searches by `isHiddenFromAccessibility`.\n const cache = accessibilityCache ?? new WeakMap<ReactTestInstance, boolean>();\n if (isHiddenFromAccessibility(element, { cache })) {\n return false;\n }\n\n if (isHiddenForStyles(element)) {\n return false;\n }\n\n // Note: this seems to be a bug in React Native.\n // PR with fix: https://github.com/facebook/react-native/pull/39157\n if (isHostModal(element) && element.props.visible === false) {\n return false;\n }\n\n const hostParent = getHostParent(element);\n if (hostParent === null) {\n return true;\n }\n\n return isElementVisible(hostParent, cache);\n}\n\nfunction isHiddenForStyles(element: ReactTestInstance) {\n const style = element.props.style ?? {};\n const { display, opacity } = StyleSheet.flatten(style);\n return display === 'none' || opacity === 0;\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,mBAA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AU,EAAEP,KAAK,CAAC;AAC5C;AAEA,SAASG,iBAAiBA,CAACd,OAA0B,EAAE;EACrD,MAAMoB,KAAK,GAAGpB,OAAO,CAACgB,KAAK,CAACI,KAAK,IAAI,CAAC,CAAC;EACvC,MAAM;IAAEC,OAAO;IAAEC;EAAQ,CAAC,GAAGC,uBAAU,CAACC,OAAO,CAACJ,KAAK,CAAC;EACtD,OAAOC,OAAO,KAAK,MAAM,IAAIC,OAAO,KAAK,CAAC;AAC5C"}
1
+ {"version":3,"file":"to-be-visible.js","names":["_jestMatcherUtils","require","_reactNative","_accessibility","_componentTree","_hostComponentNames","_utils","toBeVisible","element","isNot","checkHostElement","pass","isElementVisible","message","is","matcherHint","formatElement","join","accessibilityCache","cache","WeakMap","isHiddenFromAccessibility","isHiddenForStyles","isHostModal","props","visible","hostParent","getHostParent","style","display","opacity","StyleSheet","flatten"],"sources":["../../src/matchers/to-be-visible.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint } from 'jest-matcher-utils';\nimport { StyleSheet } from 'react-native';\nimport { isHiddenFromAccessibility } from '../helpers/accessibility';\nimport { getHostParent } from '../helpers/component-tree';\nimport { isHostModal } from '../helpers/host-component-names';\nimport { checkHostElement, formatElement } from './utils';\n\nexport function toBeVisible(this: jest.MatcherContext, element: ReactTestInstance) {\n if (element !== null || !this.isNot) {\n checkHostElement(element, toBeVisible, this);\n }\n\n return {\n pass: isElementVisible(element),\n message: () => {\n const is = this.isNot ? 'is' : 'is not';\n return [\n matcherHint(`${this.isNot ? '.not' : ''}.toBeVisible`, 'element', ''),\n '',\n `Received element ${is} visible:`,\n formatElement(element),\n ].join('\\n');\n },\n };\n}\n\nfunction isElementVisible(\n element: ReactTestInstance,\n accessibilityCache?: WeakMap<ReactTestInstance, boolean>,\n): boolean {\n // Use cache to speed up repeated searches by `isHiddenFromAccessibility`.\n const cache = accessibilityCache ?? new WeakMap<ReactTestInstance, boolean>();\n if (isHiddenFromAccessibility(element, { cache })) {\n return false;\n }\n\n if (isHiddenForStyles(element)) {\n return false;\n }\n\n // Note: this seems to be a bug in React Native.\n // PR with fix: https://github.com/facebook/react-native/pull/39157\n if (isHostModal(element) && element.props.visible === false) {\n return false;\n }\n\n const hostParent = getHostParent(element);\n if (hostParent === null) {\n return true;\n }\n\n return isElementVisible(hostParent, cache);\n}\n\nfunction isHiddenForStyles(element: ReactTestInstance) {\n const style = element.props.style ?? {};\n const { display, opacity } = StyleSheet.flatten(style);\n return display === 'none' || opacity === 0;\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEO,SAASM,WAAWA,CAA4BC,OAA0B,EAAE;EACjF,IAAIA,OAAO,KAAK,IAAI,IAAI,CAAC,IAAI,CAACC,KAAK,EAAE;IACnC,IAAAC,uBAAgB,EAACF,OAAO,EAAED,WAAW,EAAE,IAAI,CAAC;EAC9C;EAEA,OAAO;IACLI,IAAI,EAAEC,gBAAgB,CAACJ,OAAO,CAAC;IAC/BK,OAAO,EAAEA,CAAA,KAAM;MACb,MAAMC,EAAE,GAAG,IAAI,CAACL,KAAK,GAAG,IAAI,GAAG,QAAQ;MACvC,OAAO,CACL,IAAAM,6BAAW,EAAE,GAAE,IAAI,CAACN,KAAK,GAAG,MAAM,GAAG,EAAG,cAAa,EAAE,SAAS,EAAE,EAAE,CAAC,EACrE,EAAE,EACD,oBAAmBK,EAAG,WAAU,EACjC,IAAAE,oBAAa,EAACR,OAAO,CAAC,CACvB,CAACS,IAAI,CAAC,IAAI,CAAC;IACd;EACF,CAAC;AACH;AAEA,SAASL,gBAAgBA,CACvBJ,OAA0B,EAC1BU,kBAAwD,EAC/C;EACT;EACA,MAAMC,KAAK,GAAGD,kBAAkB,IAAI,IAAIE,OAAO,CAA6B,CAAC;EAC7E,IAAI,IAAAC,wCAAyB,EAACb,OAAO,EAAE;IAAEW;EAAM,CAAC,CAAC,EAAE;IACjD,OAAO,KAAK;EACd;EAEA,IAAIG,iBAAiB,CAACd,OAAO,CAAC,EAAE;IAC9B,OAAO,KAAK;EACd;;EAEA;EACA;EACA,IAAI,IAAAe,+BAAW,EAACf,OAAO,CAAC,IAAIA,OAAO,CAACgB,KAAK,CAACC,OAAO,KAAK,KAAK,EAAE;IAC3D,OAAO,KAAK;EACd;EAEA,MAAMC,UAAU,GAAG,IAAAC,4BAAa,EAACnB,OAAO,CAAC;EACzC,IAAIkB,UAAU,KAAK,IAAI,EAAE;IACvB,OAAO,IAAI;EACb;EAEA,OAAOd,gBAAgB,CAACc,UAAU,EAAEP,KAAK,CAAC;AAC5C;AAEA,SAASG,iBAAiBA,CAACd,OAA0B,EAAE;EACrD,MAAMoB,KAAK,GAAGpB,OAAO,CAACgB,KAAK,CAACI,KAAK,IAAI,CAAC,CAAC;EACvC,MAAM;IAAEC,OAAO;IAAEC;EAAQ,CAAC,GAAGC,uBAAU,CAACC,OAAO,CAACJ,KAAK,CAAC;EACtD,OAAOC,OAAO,KAAK,MAAM,IAAIC,OAAO,KAAK,CAAC;AAC5C","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"to-contain-element.js","names":["_jestMatcherUtils","require","_utils","toContainElement","container","element","checkHostElement","matches","findAll","node","pass","length","message","matcherHint","isNot","RECEIVED_COLOR","formatElement","join"],"sources":["../../src/matchers/to-contain-element.tsx"],"sourcesContent":["import { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint, RECEIVED_COLOR } from 'jest-matcher-utils';\nimport { checkHostElement, formatElement } from './utils';\n\nexport function toContainElement(\n this: jest.MatcherContext,\n container: ReactTestInstance,\n element: ReactTestInstance | null,\n) {\n checkHostElement(container, toContainElement, this);\n\n if (element !== null) {\n checkHostElement(element, toContainElement, this);\n }\n\n let matches: ReactTestInstance[] = [];\n if (element) {\n matches = container.findAll((node) => node === element);\n }\n\n return {\n pass: matches.length > 0,\n message: () => {\n return [\n matcherHint(`${this.isNot ? '.not' : ''}.toContainElement`, 'container', 'element'),\n '',\n RECEIVED_COLOR(`${formatElement(container)} ${\n this.isNot ? '\\n\\ncontains:\\n\\n' : '\\n\\ndoes not contain:\\n\\n'\n } ${formatElement(element)}\n `),\n ].join('\\n');\n },\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEO,SAASE,gBAAgBA,CAE9BC,SAA4B,EAC5BC,OAAiC,EACjC;EACA,IAAAC,uBAAgB,EAACF,SAAS,EAAED,gBAAgB,EAAE,IAAI,CAAC;EAEnD,IAAIE,OAAO,KAAK,IAAI,EAAE;IACpB,IAAAC,uBAAgB,EAACD,OAAO,EAAEF,gBAAgB,EAAE,IAAI,CAAC;EACnD;EAEA,IAAII,OAA4B,GAAG,EAAE;EACrC,IAAIF,OAAO,EAAE;IACXE,OAAO,GAAGH,SAAS,CAACI,OAAO,CAAEC,IAAI,IAAKA,IAAI,KAAKJ,OAAO,CAAC;EACzD;EAEA,OAAO;IACLK,IAAI,EAAEH,OAAO,CAACI,MAAM,GAAG,CAAC;IACxBC,OAAO,EAAEA,CAAA,KAAM;MACb,OAAO,CACL,IAAAC,6BAAW,EAAE,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,mBAAkB,EAAE,WAAW,EAAE,SAAS,CAAC,EACnF,EAAE,EACF,IAAAC,gCAAc,EAAE,GAAE,IAAAC,oBAAa,EAACZ,SAAS,CAAE,IACzC,IAAI,CAACU,KAAK,GAAG,mBAAmB,GAAG,2BACpC,IAAG,IAAAE,oBAAa,EAACX,OAAO,CAAE;AACnC,SAAS,CAAC,CACH,CAACY,IAAI,CAAC,IAAI,CAAC;IACd;EACF,CAAC;AACH"}
1
+ {"version":3,"file":"to-contain-element.js","names":["_jestMatcherUtils","require","_utils","toContainElement","container","element","checkHostElement","matches","findAll","node","pass","length","message","matcherHint","isNot","RECEIVED_COLOR","formatElement","join"],"sources":["../../src/matchers/to-contain-element.tsx"],"sourcesContent":["import { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint, RECEIVED_COLOR } from 'jest-matcher-utils';\nimport { checkHostElement, formatElement } from './utils';\n\nexport function toContainElement(\n this: jest.MatcherContext,\n container: ReactTestInstance,\n element: ReactTestInstance | null,\n) {\n checkHostElement(container, toContainElement, this);\n\n if (element !== null) {\n checkHostElement(element, toContainElement, this);\n }\n\n let matches: ReactTestInstance[] = [];\n if (element) {\n matches = container.findAll((node) => node === element);\n }\n\n return {\n pass: matches.length > 0,\n message: () => {\n return [\n matcherHint(`${this.isNot ? '.not' : ''}.toContainElement`, 'container', 'element'),\n '',\n RECEIVED_COLOR(`${formatElement(container)} ${\n this.isNot ? '\\n\\ncontains:\\n\\n' : '\\n\\ndoes not contain:\\n\\n'\n } ${formatElement(element)}\n `),\n ].join('\\n');\n },\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEO,SAASE,gBAAgBA,CAE9BC,SAA4B,EAC5BC,OAAiC,EACjC;EACA,IAAAC,uBAAgB,EAACF,SAAS,EAAED,gBAAgB,EAAE,IAAI,CAAC;EAEnD,IAAIE,OAAO,KAAK,IAAI,EAAE;IACpB,IAAAC,uBAAgB,EAACD,OAAO,EAAEF,gBAAgB,EAAE,IAAI,CAAC;EACnD;EAEA,IAAII,OAA4B,GAAG,EAAE;EACrC,IAAIF,OAAO,EAAE;IACXE,OAAO,GAAGH,SAAS,CAACI,OAAO,CAAEC,IAAI,IAAKA,IAAI,KAAKJ,OAAO,CAAC;EACzD;EAEA,OAAO;IACLK,IAAI,EAAEH,OAAO,CAACI,MAAM,GAAG,CAAC;IACxBC,OAAO,EAAEA,CAAA,KAAM;MACb,OAAO,CACL,IAAAC,6BAAW,EAAE,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,mBAAkB,EAAE,WAAW,EAAE,SAAS,CAAC,EACnF,EAAE,EACF,IAAAC,gCAAc,EAAE,GAAE,IAAAC,oBAAa,EAACZ,SAAS,CAAE,IACzC,IAAI,CAACU,KAAK,GAAG,mBAAmB,GAAG,2BACpC,IAAG,IAAAE,oBAAa,EAACX,OAAO,CAAE;AACnC,SAAS,CAAC,CACH,CAACY,IAAI,CAAC,IAAI,CAAC;IACd;EACF,CAAC;AACH","ignoreList":[]}
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.toHaveAccessibilityValue = toHaveAccessibilityValue;
7
7
  var _jestMatcherUtils = require("jest-matcher-utils");
8
- var _accessiblity = require("../helpers/accessiblity");
8
+ var _accessibility = require("../helpers/accessibility");
9
9
  var _matchAccessibilityValue = require("../helpers/matchers/match-accessibility-value");
10
10
  var _object = require("../helpers/object");
11
11
  var _utils = require("./utils");
12
12
  function toHaveAccessibilityValue(element, expectedValue) {
13
13
  (0, _utils.checkHostElement)(element, toHaveAccessibilityValue, this);
14
- const receivedValue = (0, _accessiblity.getAccessibilityValue)(element);
14
+ const receivedValue = (0, _accessibility.getAccessibilityValue)(element);
15
15
  return {
16
16
  pass: (0, _matchAccessibilityValue.matchAccessibilityValue)(element, expectedValue),
17
17
  message: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"to-have-accessibility-value.js","names":["_jestMatcherUtils","require","_accessiblity","_matchAccessibilityValue","_object","_utils","toHaveAccessibilityValue","element","expectedValue","checkHostElement","receivedValue","getAccessibilityValue","pass","matchAccessibilityValue","message","matcher","matcherHint","isNot","stringify","formatMessage","removeUndefinedKeys"],"sources":["../../src/matchers/to-have-accessibility-value.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint, stringify } from 'jest-matcher-utils';\nimport { getAccessibilityValue } from '../helpers/accessiblity';\nimport {\n AccessibilityValueMatcher,\n matchAccessibilityValue,\n} from '../helpers/matchers/match-accessibility-value';\nimport { removeUndefinedKeys } from '../helpers/object';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport function toHaveAccessibilityValue(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n expectedValue: AccessibilityValueMatcher,\n) {\n checkHostElement(element, toHaveAccessibilityValue, this);\n\n const receivedValue = getAccessibilityValue(element);\n\n return {\n pass: matchAccessibilityValue(element, expectedValue),\n message: () => {\n const matcher = matcherHint(\n `${this.isNot ? '.not' : ''}.toHaveAccessibilityValue`,\n 'element',\n stringify(expectedValue),\n );\n return formatMessage(\n matcher,\n `Expected the element ${this.isNot ? 'not to' : 'to'} have accessibility value`,\n stringify(expectedValue),\n 'Received element with accessibility value',\n stringify(removeUndefinedKeys(receivedValue)),\n );\n },\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,wBAAA,GAAAF,OAAA;AAIA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAEO,SAASK,wBAAwBA,CAEtCC,OAA0B,EAC1BC,aAAwC,EACxC;EACA,IAAAC,uBAAgB,EAACF,OAAO,EAAED,wBAAwB,EAAE,IAAI,CAAC;EAEzD,MAAMI,aAAa,GAAG,IAAAC,mCAAqB,EAACJ,OAAO,CAAC;EAEpD,OAAO;IACLK,IAAI,EAAE,IAAAC,gDAAuB,EAACN,OAAO,EAAEC,aAAa,CAAC;IACrDM,OAAO,EAAEA,CAAA,KAAM;MACb,MAAMC,OAAO,GAAG,IAAAC,6BAAW,EACxB,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,2BAA0B,EACtD,SAAS,EACT,IAAAC,2BAAS,EAACV,aAAa,CACzB,CAAC;MACD,OAAO,IAAAW,oBAAa,EAClBJ,OAAO,EACN,wBAAuB,IAAI,CAACE,KAAK,GAAG,QAAQ,GAAG,IAAK,2BAA0B,EAC/E,IAAAC,2BAAS,EAACV,aAAa,CAAC,EACxB,2CAA2C,EAC3C,IAAAU,2BAAS,EAAC,IAAAE,2BAAmB,EAACV,aAAa,CAAC,CAC9C,CAAC;IACH;EACF,CAAC;AACH"}
1
+ {"version":3,"file":"to-have-accessibility-value.js","names":["_jestMatcherUtils","require","_accessibility","_matchAccessibilityValue","_object","_utils","toHaveAccessibilityValue","element","expectedValue","checkHostElement","receivedValue","getAccessibilityValue","pass","matchAccessibilityValue","message","matcher","matcherHint","isNot","stringify","formatMessage","removeUndefinedKeys"],"sources":["../../src/matchers/to-have-accessibility-value.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint, stringify } from 'jest-matcher-utils';\nimport { getAccessibilityValue } from '../helpers/accessibility';\nimport {\n AccessibilityValueMatcher,\n matchAccessibilityValue,\n} from '../helpers/matchers/match-accessibility-value';\nimport { removeUndefinedKeys } from '../helpers/object';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport function toHaveAccessibilityValue(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n expectedValue: AccessibilityValueMatcher,\n) {\n checkHostElement(element, toHaveAccessibilityValue, this);\n\n const receivedValue = getAccessibilityValue(element);\n\n return {\n pass: matchAccessibilityValue(element, expectedValue),\n message: () => {\n const matcher = matcherHint(\n `${this.isNot ? '.not' : ''}.toHaveAccessibilityValue`,\n 'element',\n stringify(expectedValue),\n );\n return formatMessage(\n matcher,\n `Expected the element ${this.isNot ? 'not to' : 'to'} have accessibility value`,\n stringify(expectedValue),\n 'Received element with accessibility value',\n stringify(removeUndefinedKeys(receivedValue)),\n );\n },\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,wBAAA,GAAAF,OAAA;AAIA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAEO,SAASK,wBAAwBA,CAEtCC,OAA0B,EAC1BC,aAAwC,EACxC;EACA,IAAAC,uBAAgB,EAACF,OAAO,EAAED,wBAAwB,EAAE,IAAI,CAAC;EAEzD,MAAMI,aAAa,GAAG,IAAAC,oCAAqB,EAACJ,OAAO,CAAC;EAEpD,OAAO;IACLK,IAAI,EAAE,IAAAC,gDAAuB,EAACN,OAAO,EAAEC,aAAa,CAAC;IACrDM,OAAO,EAAEA,CAAA,KAAM;MACb,MAAMC,OAAO,GAAG,IAAAC,6BAAW,EACxB,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,2BAA0B,EACtD,SAAS,EACT,IAAAC,2BAAS,EAACV,aAAa,CACzB,CAAC;MACD,OAAO,IAAAW,oBAAa,EAClBJ,OAAO,EACN,wBAAuB,IAAI,CAACE,KAAK,GAAG,QAAQ,GAAG,IAAK,2BAA0B,EAC/E,IAAAC,2BAAS,EAACV,aAAa,CAAC,EACxB,2CAA2C,EAC3C,IAAAU,2BAAS,EAAC,IAAAE,2BAAmB,EAACV,aAAa,CAAC,CAC9C,CAAC;IACH;EACF,CAAC;AACH","ignoreList":[]}
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.toHaveAccessibleName = toHaveAccessibleName;
7
7
  var _jestMatcherUtils = require("jest-matcher-utils");
8
- var _accessiblity = require("../helpers/accessiblity");
8
+ var _accessibility = require("../helpers/accessibility");
9
9
  var _matches = require("../matches");
10
10
  var _utils = require("./utils");
11
11
  function toHaveAccessibleName(element, expectedName, options) {
12
12
  (0, _utils.checkHostElement)(element, toHaveAccessibleName, this);
13
- const receivedName = (0, _accessiblity.getAccessibleName)(element);
13
+ const receivedName = (0, _accessibility.getAccessibleName)(element);
14
14
  const missingExpectedValue = arguments.length === 1;
15
15
  let pass = false;
16
16
  if (missingExpectedValue) {
@@ -1 +1 @@
1
- {"version":3,"file":"to-have-accessible-name.js","names":["_jestMatcherUtils","require","_accessiblity","_matches","_utils","toHaveAccessibleName","element","expectedName","options","checkHostElement","receivedName","getAccessibleName","missingExpectedValue","arguments","length","pass","matches","normalizer","exact","message","formatMessage","matcherHint","isNot","join"],"sources":["../../src/matchers/to-have-accessible-name.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint } from 'jest-matcher-utils';\nimport { getAccessibleName } from '../helpers/accessiblity';\nimport { TextMatch, TextMatchOptions, matches } from '../matches';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport function toHaveAccessibleName(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n expectedName?: TextMatch,\n options?: TextMatchOptions,\n) {\n checkHostElement(element, toHaveAccessibleName, this);\n\n const receivedName = getAccessibleName(element);\n const missingExpectedValue = arguments.length === 1;\n\n let pass = false;\n if (missingExpectedValue) {\n pass = receivedName !== '';\n } else {\n pass =\n expectedName != null\n ? matches(expectedName, receivedName, options?.normalizer, options?.exact)\n : false;\n }\n\n return {\n pass,\n message: () => {\n return [\n formatMessage(\n matcherHint(`${this.isNot ? '.not' : ''}.toHaveAccessibleName`, 'element', ''),\n `Expected element ${this.isNot ? 'not to' : 'to'} have accessible name`,\n expectedName,\n 'Received',\n receivedName,\n ),\n ].join('\\n');\n },\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEO,SAASI,oBAAoBA,CAElCC,OAA0B,EAC1BC,YAAwB,EACxBC,OAA0B,EAC1B;EACA,IAAAC,uBAAgB,EAACH,OAAO,EAAED,oBAAoB,EAAE,IAAI,CAAC;EAErD,MAAMK,YAAY,GAAG,IAAAC,+BAAiB,EAACL,OAAO,CAAC;EAC/C,MAAMM,oBAAoB,GAAGC,SAAS,CAACC,MAAM,KAAK,CAAC;EAEnD,IAAIC,IAAI,GAAG,KAAK;EAChB,IAAIH,oBAAoB,EAAE;IACxBG,IAAI,GAAGL,YAAY,KAAK,EAAE;EAC5B,CAAC,MAAM;IACLK,IAAI,GACFR,YAAY,IAAI,IAAI,GAChB,IAAAS,gBAAO,EAACT,YAAY,EAAEG,YAAY,EAAEF,OAAO,EAAES,UAAU,EAAET,OAAO,EAAEU,KAAK,CAAC,GACxE,KAAK;EACb;EAEA,OAAO;IACLH,IAAI;IACJI,OAAO,EAAEA,CAAA,KAAM;MACb,OAAO,CACL,IAAAC,oBAAa,EACX,IAAAC,6BAAW,EAAE,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,uBAAsB,EAAE,SAAS,EAAE,EAAE,CAAC,EAC7E,oBAAmB,IAAI,CAACA,KAAK,GAAG,QAAQ,GAAG,IAAK,uBAAsB,EACvEf,YAAY,EACZ,UAAU,EACVG,YACF,CAAC,CACF,CAACa,IAAI,CAAC,IAAI,CAAC;IACd;EACF,CAAC;AACH"}
1
+ {"version":3,"file":"to-have-accessible-name.js","names":["_jestMatcherUtils","require","_accessibility","_matches","_utils","toHaveAccessibleName","element","expectedName","options","checkHostElement","receivedName","getAccessibleName","missingExpectedValue","arguments","length","pass","matches","normalizer","exact","message","formatMessage","matcherHint","isNot","join"],"sources":["../../src/matchers/to-have-accessible-name.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint } from 'jest-matcher-utils';\nimport { getAccessibleName } from '../helpers/accessibility';\nimport { TextMatch, TextMatchOptions, matches } from '../matches';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport function toHaveAccessibleName(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n expectedName?: TextMatch,\n options?: TextMatchOptions,\n) {\n checkHostElement(element, toHaveAccessibleName, this);\n\n const receivedName = getAccessibleName(element);\n const missingExpectedValue = arguments.length === 1;\n\n let pass = false;\n if (missingExpectedValue) {\n pass = receivedName !== '';\n } else {\n pass =\n expectedName != null\n ? matches(expectedName, receivedName, options?.normalizer, options?.exact)\n : false;\n }\n\n return {\n pass,\n message: () => {\n return [\n formatMessage(\n matcherHint(`${this.isNot ? '.not' : ''}.toHaveAccessibleName`, 'element', ''),\n `Expected element ${this.isNot ? 'not to' : 'to'} have accessible name`,\n expectedName,\n 'Received',\n receivedName,\n ),\n ].join('\\n');\n },\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEO,SAASI,oBAAoBA,CAElCC,OAA0B,EAC1BC,YAAwB,EACxBC,OAA0B,EAC1B;EACA,IAAAC,uBAAgB,EAACH,OAAO,EAAED,oBAAoB,EAAE,IAAI,CAAC;EAErD,MAAMK,YAAY,GAAG,IAAAC,gCAAiB,EAACL,OAAO,CAAC;EAC/C,MAAMM,oBAAoB,GAAGC,SAAS,CAACC,MAAM,KAAK,CAAC;EAEnD,IAAIC,IAAI,GAAG,KAAK;EAChB,IAAIH,oBAAoB,EAAE;IACxBG,IAAI,GAAGL,YAAY,KAAK,EAAE;EAC5B,CAAC,MAAM;IACLK,IAAI,GACFR,YAAY,IAAI,IAAI,GAChB,IAAAS,gBAAO,EAACT,YAAY,EAAEG,YAAY,EAAEF,OAAO,EAAES,UAAU,EAAET,OAAO,EAAEU,KAAK,CAAC,GACxE,KAAK;EACb;EAEA,OAAO;IACLH,IAAI;IACJI,OAAO,EAAEA,CAAA,KAAM;MACb,OAAO,CACL,IAAAC,oBAAa,EACX,IAAAC,6BAAW,EAAE,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,uBAAsB,EAAE,SAAS,EAAE,EAAE,CAAC,EAC7E,oBAAmB,IAAI,CAACA,KAAK,GAAG,QAAQ,GAAG,IAAK,uBAAsB,EACvEf,YAAY,EACZ,UAAU,EACVG,YACF,CAAC,CACF,CAACa,IAAI,CAAC,IAAI,CAAC;IACd;EACF,CAAC;AACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"to-have-display-value.js","names":["_jestMatcherUtils","require","_hostComponentNames","_errors","_textInput","_matches","_utils","toHaveDisplayValue","element","expectedValue","options","checkHostElement","isHostTextInput","ErrorWithStack","type","receivedValue","getTextInputValue","pass","matches","normalizer","exact","message","formatMessage","matcherHint","isNot","join"],"sources":["../../src/matchers/to-have-display-value.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint } from 'jest-matcher-utils';\nimport { isHostTextInput } from '../helpers/host-component-names';\nimport { ErrorWithStack } from '../helpers/errors';\nimport { getTextInputValue } from '../helpers/text-input';\nimport { TextMatch, TextMatchOptions, matches } from '../matches';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport function toHaveDisplayValue(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n expectedValue: TextMatch,\n options?: TextMatchOptions,\n) {\n checkHostElement(element, toHaveDisplayValue, this);\n\n if (!isHostTextInput(element)) {\n throw new ErrorWithStack(\n `toHaveDisplayValue() works only with host \"TextInput\" elements. Passed element has type \"${element.type}\".`,\n toHaveDisplayValue,\n );\n }\n\n const receivedValue = getTextInputValue(element);\n\n return {\n pass: matches(expectedValue, receivedValue, options?.normalizer, options?.exact),\n message: () => {\n return [\n formatMessage(\n matcherHint(`${this.isNot ? '.not' : ''}.toHaveDisplayValue`, 'element', ''),\n `Expected element ${this.isNot ? 'not to' : 'to'} have display value`,\n expectedValue,\n 'Received',\n receivedValue,\n ),\n ].join('\\n');\n },\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEO,SAASM,kBAAkBA,CAEhCC,OAA0B,EAC1BC,aAAwB,EACxBC,OAA0B,EAC1B;EACA,IAAAC,uBAAgB,EAACH,OAAO,EAAED,kBAAkB,EAAE,IAAI,CAAC;EAEnD,IAAI,CAAC,IAAAK,mCAAe,EAACJ,OAAO,CAAC,EAAE;IAC7B,MAAM,IAAIK,sBAAc,CACrB,4FAA2FL,OAAO,CAACM,IAAK,IAAG,EAC5GP,kBACF,CAAC;EACH;EAEA,MAAMQ,aAAa,GAAG,IAAAC,4BAAiB,EAACR,OAAO,CAAC;EAEhD,OAAO;IACLS,IAAI,EAAE,IAAAC,gBAAO,EAACT,aAAa,EAAEM,aAAa,EAAEL,OAAO,EAAES,UAAU,EAAET,OAAO,EAAEU,KAAK,CAAC;IAChFC,OAAO,EAAEA,CAAA,KAAM;MACb,OAAO,CACL,IAAAC,oBAAa,EACX,IAAAC,6BAAW,EAAE,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,qBAAoB,EAAE,SAAS,EAAE,EAAE,CAAC,EAC3E,oBAAmB,IAAI,CAACA,KAAK,GAAG,QAAQ,GAAG,IAAK,qBAAoB,EACrEf,aAAa,EACb,UAAU,EACVM,aACF,CAAC,CACF,CAACU,IAAI,CAAC,IAAI,CAAC;IACd;EACF,CAAC;AACH"}
1
+ {"version":3,"file":"to-have-display-value.js","names":["_jestMatcherUtils","require","_hostComponentNames","_errors","_textInput","_matches","_utils","toHaveDisplayValue","element","expectedValue","options","checkHostElement","isHostTextInput","ErrorWithStack","type","receivedValue","getTextInputValue","pass","matches","normalizer","exact","message","formatMessage","matcherHint","isNot","join"],"sources":["../../src/matchers/to-have-display-value.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint } from 'jest-matcher-utils';\nimport { isHostTextInput } from '../helpers/host-component-names';\nimport { ErrorWithStack } from '../helpers/errors';\nimport { getTextInputValue } from '../helpers/text-input';\nimport { TextMatch, TextMatchOptions, matches } from '../matches';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport function toHaveDisplayValue(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n expectedValue: TextMatch,\n options?: TextMatchOptions,\n) {\n checkHostElement(element, toHaveDisplayValue, this);\n\n if (!isHostTextInput(element)) {\n throw new ErrorWithStack(\n `toHaveDisplayValue() works only with host \"TextInput\" elements. Passed element has type \"${element.type}\".`,\n toHaveDisplayValue,\n );\n }\n\n const receivedValue = getTextInputValue(element);\n\n return {\n pass: matches(expectedValue, receivedValue, options?.normalizer, options?.exact),\n message: () => {\n return [\n formatMessage(\n matcherHint(`${this.isNot ? '.not' : ''}.toHaveDisplayValue`, 'element', ''),\n `Expected element ${this.isNot ? 'not to' : 'to'} have display value`,\n expectedValue,\n 'Received',\n receivedValue,\n ),\n ].join('\\n');\n },\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEO,SAASM,kBAAkBA,CAEhCC,OAA0B,EAC1BC,aAAwB,EACxBC,OAA0B,EAC1B;EACA,IAAAC,uBAAgB,EAACH,OAAO,EAAED,kBAAkB,EAAE,IAAI,CAAC;EAEnD,IAAI,CAAC,IAAAK,mCAAe,EAACJ,OAAO,CAAC,EAAE;IAC7B,MAAM,IAAIK,sBAAc,CACrB,4FAA2FL,OAAO,CAACM,IAAK,IAAG,EAC5GP,kBACF,CAAC;EACH;EAEA,MAAMQ,aAAa,GAAG,IAAAC,4BAAiB,EAACR,OAAO,CAAC;EAEhD,OAAO;IACLS,IAAI,EAAE,IAAAC,gBAAO,EAACT,aAAa,EAAEM,aAAa,EAAEL,OAAO,EAAES,UAAU,EAAET,OAAO,EAAEU,KAAK,CAAC;IAChFC,OAAO,EAAEA,CAAA,KAAM;MACb,OAAO,CACL,IAAAC,oBAAa,EACX,IAAAC,6BAAW,EAAE,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,qBAAoB,EAAE,SAAS,EAAE,EAAE,CAAC,EAC3E,oBAAmB,IAAI,CAACA,KAAK,GAAG,QAAQ,GAAG,IAAK,qBAAoB,EACrEf,aAAa,EACb,UAAU,EACVM,aACF,CAAC,CACF,CAACU,IAAI,CAAC,IAAI,CAAC;IACd;EACF,CAAC;AACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"to-have-prop.js","names":["_jestMatcherUtils","require","_utils","toHaveProp","element","name","expectedValue","checkHostElement","isExpectedValueDefined","undefined","hasProp","props","receivedValue","pass","equals","message","to","isNot","matcher","matcherHint","printExpected","secondArgument","formatMessage","formatProp","value","stringify"],"sources":["../../src/matchers/to-have-prop.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint, stringify, printExpected } from 'jest-matcher-utils';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport function toHaveProp(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n name: string,\n expectedValue: unknown,\n) {\n checkHostElement(element, toHaveProp, this);\n\n const isExpectedValueDefined = expectedValue !== undefined;\n const hasProp = name in element.props;\n const receivedValue = element.props[name];\n\n const pass = isExpectedValueDefined\n ? hasProp && this.equals(expectedValue, receivedValue)\n : hasProp;\n\n return {\n pass,\n message: () => {\n const to = this.isNot ? 'not to' : 'to';\n const matcher = matcherHint(\n `${this.isNot ? '.not' : ''}.toHaveProp`,\n 'element',\n printExpected(name),\n {\n secondArgument: isExpectedValueDefined ? printExpected(expectedValue) : undefined,\n },\n );\n return formatMessage(\n matcher,\n `Expected element ${to} have prop`,\n formatProp(name, expectedValue),\n 'Received',\n hasProp ? formatProp(name, receivedValue) : undefined,\n );\n },\n };\n}\n\nfunction formatProp(name: string, value: unknown) {\n if (value === undefined) {\n return name;\n }\n\n if (typeof value === 'string') {\n return `${name}=\"${value}\"`;\n }\n\n return `${name}={${stringify(value)}}`;\n}\n"],"mappings":";;;;;;AACA,IAAAA,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7B,OAAQ,GAAEnB,IAAK,KAAImB,KAAM,GAAE;EAC7B;EAEA,OAAQ,GAAEnB,IAAK,KAAI,IAAAoB,2BAAS,EAACD,KAAK,CAAE,GAAE;AACxC"}
1
+ {"version":3,"file":"to-have-prop.js","names":["_jestMatcherUtils","require","_utils","toHaveProp","element","name","expectedValue","checkHostElement","isExpectedValueDefined","undefined","hasProp","props","receivedValue","pass","equals","message","to","isNot","matcher","matcherHint","printExpected","secondArgument","formatMessage","formatProp","value","stringify"],"sources":["../../src/matchers/to-have-prop.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint, stringify, printExpected } from 'jest-matcher-utils';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport function toHaveProp(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n name: string,\n expectedValue: unknown,\n) {\n checkHostElement(element, toHaveProp, this);\n\n const isExpectedValueDefined = expectedValue !== undefined;\n const hasProp = name in element.props;\n const receivedValue = element.props[name];\n\n const pass = isExpectedValueDefined\n ? hasProp && this.equals(expectedValue, receivedValue)\n : hasProp;\n\n return {\n pass,\n message: () => {\n const to = this.isNot ? 'not to' : 'to';\n const matcher = matcherHint(\n `${this.isNot ? '.not' : ''}.toHaveProp`,\n 'element',\n printExpected(name),\n {\n secondArgument: isExpectedValueDefined ? printExpected(expectedValue) : undefined,\n },\n );\n return formatMessage(\n matcher,\n `Expected element ${to} have prop`,\n formatProp(name, expectedValue),\n 'Received',\n hasProp ? formatProp(name, receivedValue) : undefined,\n );\n },\n };\n}\n\nfunction formatProp(name: string, value: unknown) {\n if (value === undefined) {\n return name;\n }\n\n if (typeof value === 'string') {\n return `${name}=\"${value}\"`;\n }\n\n return `${name}={${stringify(value)}}`;\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEO,SAASE,UAAUA,CAExBC,OAA0B,EAC1BC,IAAY,EACZC,aAAsB,EACtB;EACA,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;AACxC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"to-have-style.js","names":["_reactNative","require","_jestMatcherUtils","_utils","toHaveStyle","element","style","checkHostElement","expected","StyleSheet","flatten","received","props","pass","Object","keys","every","key","equals","message","to","isNot","matcher","matcherHint","formatMessage","formatStyles","pickReceivedStyles","expectedDiff","join","receivedNarrow","diff","result","forEach","undefined","sort","map","prop","Array","isArray","JSON","stringify"],"sources":["../../src/matchers/to-have-style.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { ImageStyle, StyleProp, StyleSheet, TextStyle, ViewStyle } from 'react-native';\nimport { matcherHint, diff } from 'jest-matcher-utils';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport type Style = ViewStyle | TextStyle | ImageStyle;\n\ntype StyleLike = Record<string, unknown>;\n\nexport function toHaveStyle(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n style: StyleProp<Style>,\n) {\n checkHostElement(element, toHaveStyle, this);\n\n const expected = (StyleSheet.flatten(style) as StyleLike) ?? {};\n const received = (StyleSheet.flatten(element.props.style) as StyleLike) ?? {};\n\n const pass = Object.keys(expected).every((key) => this.equals(expected[key], received[key]));\n\n return {\n pass,\n message: () => {\n const to = this.isNot ? 'not to' : 'to';\n const matcher = matcherHint(`${this.isNot ? '.not' : ''}.toHaveStyle`, 'element', '');\n\n if (pass) {\n return formatMessage(\n matcher,\n `Expected element ${to} have style`,\n formatStyles(expected),\n 'Received',\n formatStyles(pickReceivedStyles(expected, received)),\n );\n } else {\n return [matcher, '', expectedDiff(expected, received)].join('\\n');\n }\n },\n };\n}\n\n/**\n * Generate diff between `expected` and `received` styles.\n */\nfunction expectedDiff(expected: StyleLike, received: StyleLike) {\n const receivedNarrow = pickReceivedStyles(expected, received);\n return diff(formatStyles(expected), formatStyles(receivedNarrow));\n}\n\n/**\n * Pick from `received` style only the keys present in `expected` style.\n */\nfunction pickReceivedStyles(expected: StyleLike, received: StyleLike) {\n const result: StyleLike = {};\n Object.keys(received).forEach((key) => {\n if (expected[key] !== undefined) {\n result[key] = received[key];\n }\n });\n\n return result;\n}\n\nfunction formatStyles(style: StyleLike) {\n return Object.keys(style)\n .sort()\n .map((prop) =>\n Array.isArray(style[prop])\n ? `${prop}: ${JSON.stringify(style[prop], null, 2)};`\n : `${prop}: ${style[prop]};`,\n )\n .join('\\n');\n}\n"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAMO,SAASG,WAAWA,CAEzBC,OAA0B,EAC1BC,KAAuB,EACvB;EACA,IAAAC,uBAAgB,EAACF,OAAO,EAAED,WAAW,EAAE,IAAI,CAAC;EAE5C,MAAMI,QAAQ,GAAIC,uBAAU,CAACC,OAAO,CAACJ,KAAK,CAAC,IAAkB,CAAC,CAAC;EAC/D,MAAMK,QAAQ,GAAIF,uBAAU,CAACC,OAAO,CAACL,OAAO,CAACO,KAAK,CAACN,KAAK,CAAC,IAAkB,CAAC,CAAC;EAE7E,MAAMO,IAAI,GAAGC,MAAM,CAACC,IAAI,CAACP,QAAQ,CAAC,CAACQ,KAAK,CAAEC,GAAG,IAAK,IAAI,CAACC,MAAM,CAACV,QAAQ,CAACS,GAAG,CAAC,EAAEN,QAAQ,CAACM,GAAG,CAAC,CAAC,CAAC;EAE5F,OAAO;IACLJ,IAAI;IACJM,OAAO,EAAEA,CAAA,KAAM;MACb,MAAMC,EAAE,GAAG,IAAI,CAACC,KAAK,GAAG,QAAQ,GAAG,IAAI;MACvC,MAAMC,OAAO,GAAG,IAAAC,6BAAW,EAAE,GAAE,IAAI,CAACF,KAAK,GAAG,MAAM,GAAG,EAAG,cAAa,EAAE,SAAS,EAAE,EAAE,CAAC;MAErF,IAAIR,IAAI,EAAE;QACR,OAAO,IAAAW,oBAAa,EAClBF,OAAO,EACN,oBAAmBF,EAAG,aAAY,EACnCK,YAAY,CAACjB,QAAQ,CAAC,EACtB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AC9B,CAAC,CACAR,IAAI,CAAC,IAAI,CAAC;AACf"}
1
+ {"version":3,"file":"to-have-style.js","names":["_reactNative","require","_jestMatcherUtils","_utils","toHaveStyle","element","style","checkHostElement","expected","StyleSheet","flatten","received","props","pass","Object","keys","every","key","equals","message","to","isNot","matcher","matcherHint","formatMessage","formatStyles","pickReceivedStyles","expectedDiff","join","receivedNarrow","diff","result","forEach","undefined","sort","map","prop","Array","isArray","JSON","stringify"],"sources":["../../src/matchers/to-have-style.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { ImageStyle, StyleProp, StyleSheet, TextStyle, ViewStyle } from 'react-native';\nimport { matcherHint, diff } from 'jest-matcher-utils';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport type Style = ViewStyle | TextStyle | ImageStyle;\n\ntype StyleLike = Record<string, unknown>;\n\nexport function toHaveStyle(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n style: StyleProp<Style>,\n) {\n checkHostElement(element, toHaveStyle, this);\n\n const expected = (StyleSheet.flatten(style) as StyleLike) ?? {};\n const received = (StyleSheet.flatten(element.props.style) as StyleLike) ?? {};\n\n const pass = Object.keys(expected).every((key) => this.equals(expected[key], received[key]));\n\n return {\n pass,\n message: () => {\n const to = this.isNot ? 'not to' : 'to';\n const matcher = matcherHint(`${this.isNot ? '.not' : ''}.toHaveStyle`, 'element', '');\n\n if (pass) {\n return formatMessage(\n matcher,\n `Expected element ${to} have style`,\n formatStyles(expected),\n 'Received',\n formatStyles(pickReceivedStyles(expected, received)),\n );\n } else {\n return [matcher, '', expectedDiff(expected, received)].join('\\n');\n }\n },\n };\n}\n\n/**\n * Generate diff between `expected` and `received` styles.\n */\nfunction expectedDiff(expected: StyleLike, received: StyleLike) {\n const receivedNarrow = pickReceivedStyles(expected, received);\n return diff(formatStyles(expected), formatStyles(receivedNarrow));\n}\n\n/**\n * Pick from `received` style only the keys present in `expected` style.\n */\nfunction pickReceivedStyles(expected: StyleLike, received: StyleLike) {\n const result: StyleLike = {};\n Object.keys(received).forEach((key) => {\n if (expected[key] !== undefined) {\n result[key] = received[key];\n }\n });\n\n return result;\n}\n\nfunction formatStyles(style: StyleLike) {\n return Object.keys(style)\n .sort()\n .map((prop) =>\n Array.isArray(style[prop])\n ? `${prop}: ${JSON.stringify(style[prop], null, 2)};`\n : `${prop}: ${style[prop]};`,\n )\n .join('\\n');\n}\n"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAMO,SAASG,WAAWA,CAEzBC,OAA0B,EAC1BC,KAAuB,EACvB;EACA,IAAAC,uBAAgB,EAACF,OAAO,EAAED,WAAW,EAAE,IAAI,CAAC;EAE5C,MAAMI,QAAQ,GAAIC,uBAAU,CAACC,OAAO,CAACJ,KAAK,CAAC,IAAkB,CAAC,CAAC;EAC/D,MAAMK,QAAQ,GAAIF,uBAAU,CAACC,OAAO,CAACL,OAAO,CAACO,KAAK,CAACN,KAAK,CAAC,IAAkB,CAAC,CAAC;EAE7E,MAAMO,IAAI,GAAGC,MAAM,CAACC,IAAI,CAACP,QAAQ,CAAC,CAACQ,KAAK,CAAEC,GAAG,IAAK,IAAI,CAACC,MAAM,CAACV,QAAQ,CAACS,GAAG,CAAC,EAAEN,QAAQ,CAACM,GAAG,CAAC,CAAC,CAAC;EAE5F,OAAO;IACLJ,IAAI;IACJM,OAAO,EAAEA,CAAA,KAAM;MACb,MAAMC,EAAE,GAAG,IAAI,CAACC,KAAK,GAAG,QAAQ,GAAG,IAAI;MACvC,MAAMC,OAAO,GAAG,IAAAC,6BAAW,EAAE,GAAE,IAAI,CAACF,KAAK,GAAG,MAAM,GAAG,EAAG,cAAa,EAAE,SAAS,EAAE,EAAE,CAAC;MAErF,IAAIR,IAAI,EAAE;QACR,OAAO,IAAAW,oBAAa,EAClBF,OAAO,EACN,oBAAmBF,EAAG,aAAY,EACnCK,YAAY,CAACjB,Q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8B,IAAI,CAAE,GAC9B,CAAC,CACAR,IAAI,CAAC,IAAI,CAAC;AACf","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"to-have-text-content.js","names":["_jestMatcherUtils","require","_textContent","_matches","_utils","toHaveTextContent","element","expectedText","options","checkHostElement","text","getTextContent","pass","matches","normalizer","exact","message","formatMessage","matcherHint","isNot","join"],"sources":["../../src/matchers/to-have-text-content.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint } from 'jest-matcher-utils';\nimport { getTextContent } from '../helpers/text-content';\nimport { TextMatch, TextMatchOptions, matches } from '../matches';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport function toHaveTextContent(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n expectedText: TextMatch,\n options?: TextMatchOptions,\n) {\n checkHostElement(element, toHaveTextContent, this);\n\n const text = getTextContent(element);\n\n return {\n pass: matches(expectedText, text, options?.normalizer, options?.exact),\n message: () => {\n return [\n formatMessage(\n matcherHint(`${this.isNot ? '.not' : ''}.toHaveTextContent`, 'element', ''),\n `Expected element ${this.isNot ? 'not to' : 'to'} have text content`,\n expectedText,\n 'Received',\n text,\n ),\n ].join('\\n');\n },\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEO,SAASI,iBAAiBA,CAE/BC,OAA0B,EAC1BC,YAAuB,EACvBC,OAA0B,EAC1B;EACA,IAAAC,uBAAgB,EAACH,OAAO,EAAED,iBAAiB,EAAE,IAAI,CAAC;EAElD,MAAMK,IAAI,GAAG,IAAAC,2BAAc,EAACL,OAAO,CAAC;EAEpC,OAAO;IACLM,IAAI,EAAE,IAAAC,gBAAO,EAACN,YAAY,EAAEG,IAAI,EAAEF,OAAO,EAAEM,UAAU,EAAEN,OAAO,EAAEO,KAAK,CAAC;IACtEC,OAAO,EAAEA,CAAA,KAAM;MACb,OAAO,CACL,IAAAC,oBAAa,EACX,IAAAC,6BAAW,EAAE,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,oBAAmB,EAAE,SAAS,EAAE,EAAE,CAAC,EAC1E,oBAAmB,IAAI,CAACA,KAAK,GAAG,QAAQ,GAAG,IAAK,oBAAmB,EACpEZ,YAAY,EACZ,UAAU,EACVG,IACF,CAAC,CACF,CAACU,IAAI,CAAC,IAAI,CAAC;IACd;EACF,CAAC;AACH"}
1
+ {"version":3,"file":"to-have-text-content.js","names":["_jestMatcherUtils","require","_textContent","_matches","_utils","toHaveTextContent","element","expectedText","options","checkHostElement","text","getTextContent","pass","matches","normalizer","exact","message","formatMessage","matcherHint","isNot","join"],"sources":["../../src/matchers/to-have-text-content.tsx"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { matcherHint } from 'jest-matcher-utils';\nimport { getTextContent } from '../helpers/text-content';\nimport { TextMatch, TextMatchOptions, matches } from '../matches';\nimport { checkHostElement, formatMessage } from './utils';\n\nexport function toHaveTextContent(\n this: jest.MatcherContext,\n element: ReactTestInstance,\n expectedText: TextMatch,\n options?: TextMatchOptions,\n) {\n checkHostElement(element, toHaveTextContent, this);\n\n const text = getTextContent(element);\n\n return {\n pass: matches(expectedText, text, options?.normalizer, options?.exact),\n message: () => {\n return [\n formatMessage(\n matcherHint(`${this.isNot ? '.not' : ''}.toHaveTextContent`, 'element', ''),\n `Expected element ${this.isNot ? 'not to' : 'to'} have text content`,\n expectedText,\n 'Received',\n text,\n ),\n ].join('\\n');\n },\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEO,SAASI,iBAAiBA,CAE/BC,OAA0B,EAC1BC,YAAuB,EACvBC,OAA0B,EAC1B;EACA,IAAAC,uBAAgB,EAACH,OAAO,EAAED,iBAAiB,EAAE,IAAI,CAAC;EAElD,MAAMK,IAAI,GAAG,IAAAC,2BAAc,EAACL,OAAO,CAAC;EAEpC,OAAO;IACLM,IAAI,EAAE,IAAAC,gBAAO,EAACN,YAAY,EAAEG,IAAI,EAAEF,OAAO,EAAEM,UAAU,EAAEN,OAAO,EAAEO,KAAK,CAAC;IACtEC,OAAO,EAAEA,CAAA,KAAM;MACb,OAAO,CACL,IAAAC,oBAAa,EACX,IAAAC,6BAAW,EAAE,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,oBAAmB,EAAE,SAAS,EAAE,EAAE,CAAC,EAC1E,oBAAmB,IAAI,CAACA,KAAK,GAAG,QAAQ,GAAG,IAAK,oBAAmB,EACpEZ,YAAY,EACZ,UAAU,EACVG,IACF,CAAC,CACF,CAACU,IAAI,CAAC,IAAI,CAAC;IACd;EACF,CAAC;AACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/matchers/types.ts"],"sourcesContent":["import type { StyleProp } from 'react-native';\nimport type { ReactTestInstance } from 'react-test-renderer';\nimport { AccessibilityValueMatcher } from '../helpers/matchers/match-accessibility-value';\nimport { TextMatch, TextMatchOptions } from '../matches';\nimport { Style } from './to-have-style';\n\nexport interface JestNativeMatchers<R> {\n /**\n * Assert whether a host element is present in the element tree (screen) or not.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeonthescreen)\n *\n * @example\n * <Text>Hello</Text>\n *\n * expect(getByText('Hello')).toBeOnTheScreen()\n * expect(queryByText('Other')).not.toBeOnTheScreen()\n */\n toBeOnTheScreen(): R;\n\n /**\n * Assert whether a host element is checked based on accessibility props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobechecked)\n *\n * @see {@link toBePartiallyChecked} for a related matcher.\n *\n * @example\n * <View accessible role=\"checkbox\" aria-checked aria-label=\"Enable\" />\n *\n * expect(getByRole('checkbox', { name: \"Enable\" })).toBeChecked()\n */\n toBeChecked(): R;\n\n /**\n * Assert whether a host element is collapsed based on accessibility props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeexpanded)\n *\n * @see {@link toBeExpanded} for an inverse matcher.\n *\n * @example\n * <View testID=\"details\" aria-expanded={false} />\n *\n * expect(getByTestId('details').toBeCollapsed()\n */\n toBeCollapsed(): R;\n\n /**\n * Assert whether a host element is disabled based on accessibility props.\n *\n * This matcher will check ancestor elements for their disabled state as well.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeenabled)\n *\n * @see {@link toBeEnabled} for an inverse matcher.\n *\n * @example\n * <View role=\"button\" aria-disabled />\n *\n * expect(getByRole('button').toBeDisabled()\n *\n */\n toBeDisabled(): R;\n\n /**\n * Assert whether a host element is busy based on accessibility props.\n *\n * This matcher will check ancestor elements for their disabled state as well.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobebusy)\n *\n * @example\n * <View testID=\"loader\" aria-busy />\n *\n * expect(getByTestId('loader')).toBeBusy()\n */\n toBeBusy(): R;\n\n /**\n * Assert whether a host element has no host children or text content.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeemptyelement)\n *\n * @example\n * <View testID=\"not-empty\">\n * <View testID=\"empty\" />\n * </View>\n *\n * expect(getByTestId('empty')).toBeEmptyElement()\n * expect(getByTestId('not-mepty')).not.toBeEmptyElement()\n */\n toBeEmptyElement(): R;\n\n /**\n * Assert whether a host element is enabled based on accessibility props.\n *\n * This matcher will check ancestor elements for their disabled state as well.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeenabled)\n *\n * @see {@link toBeDisabled} for inverse matcher.\n *\n * @example\n * <View role=\"button\" aria-disabled={false} />\n *\n * expect(getByRole('button').toBeEnabled()\n */\n toBeEnabled(): R;\n\n /**\n * Assert whether a host element is expanded based on accessibility props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeexpanded)\n *\n * @see {@link toBeCollapsed} for inverse matcher.\n *\n * @example\n * <View testID=\"details\" aria-expanded />\n *\n * expect(getByTestId('details').toBeExpanded()\n */\n toBeExpanded(): R;\n\n /**\n * Assert whether a host element is partially checked based on accessibility props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobechecked)\n *\n * @see {@link toBeChecked} for related matcher.\n *\n * @example\n * <View accessible role=\"checkbox\" aria-checked=\"mixed\" aria-label=\"Enable\" />\n *\n * expect(getByRole('checkbox', { name: \"Enable\" })).toBePartiallyChecked()\n */\n toBePartiallyChecked(): R;\n\n /**\n * Assert whether a host element is selected based on accessibility props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeselected)\n *\n * @example\n * <View testID=\"view\" aria-selected />\n *\n * expect(getByTestId('view')).toBeSelected()\n */\n toBeSelected(): R;\n\n /**\n * Assert whether a host element is visible based on style and accessibility props.\n *\n * This matcher will check ancestor elements for their visibility as well.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobevisible)\n *\n * @example\n * <View testID=\"visible\" />\n * <View testID=\"not-visible\" style={{ display: 'none' }} />\n *\n * expect(getByTestId('visible')).toBeVisible()\n * expect(getByTestId('not-visible')).not.toBeVisible()\n */\n toBeVisible(): R;\n\n /**\n * Assert whether a host element contains another host element.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tocontainelement)\n *\n * @example\n * <View testID=\"outer\">\n * <View testID=\"inner\" />\n * </View>\n *\n * expect(getByTestId('outer')).toContainElement(getByTestId('inner'));\n */\n toContainElement(element: ReactTestInstance | null): R;\n\n /**\n * Assert whether a host element has a given accessbility value.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohaveaccessibilityvalue)\n *\n *\n * @example\n * <View testID=\"view\" aria-valuetext=\"33%\" />\n *\n * expect(getByTestId('view')).toHaveAccessibilityValue({ text: '33%' });\n */\n toHaveAccessibilityValue(expectedValue: AccessibilityValueMatcher): R;\n\n /**\n * Assert whether a host element has a given accessibile name based on the accessibility label or text content.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohaveaccessiblename)\n *\n * @example\n * <View testID=\"view\" aria-label=\"Hello\" />\n *\n * expect(getByTestId('view')).toHaveAccessibleName('Hello');\n */\n toHaveAccessibleName(expectedName?: TextMatch, options?: TextMatchOptions): R;\n\n /**\n * Assert whether a host `TextInput` element has a given display value based on `value` and `defaultValue` props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohavedisplayvalue)\n *\n * @example\n * <TextInput testID=\"input\" value=\"Hello\" />\n *\n * expect(getByTestId('input')).toHaveDisplayValue('Hello');\n */\n toHaveDisplayValue(expectedValue: TextMatch, options?: TextMatchOptions): R;\n\n /**\n * Assert whether a host element has a given prop.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohaveprop)\n *\n * @example\n * <Text testID=\"text\" numberOfLines={1]} />\n *\n * expect(getByTestId('text')).toHaveProp('numberOfLines');\n * expect(getByTestId('text')).toHaveProp('numberOfLines', 1);\n */\n toHaveProp(name: string, expectedValue?: unknown): R;\n\n /**\n * Assert whether a host element has a given style.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohavestyle)\n *\n * @example\n * <View testID=\"view\" style={{ width: '100%' }} />\n *\n * expect(getByTestId('view')).toHaveStyle({ width: '100%' });\n * expect(getByTestId('view')).not.toHaveStyle({ width: '50%' });\n */\n toHaveStyle(style: StyleProp<Style>): R;\n\n /**\n * Assert whether a host element has a given text content.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohavetextcontent)\n *\n * @example\n * <View testID=\"view\">\n * <Text>Hello World</Text>\n * </View>\n *\n * expect(getByTestId('view')).toHaveTextContent('Hello World');\n * expect(getByTestId('view')).toHaveTextContent('Hello', { exact: false }});\n * expect(getByTestId('view')).toHaveTextContent(/hello/i);\n * expect(getByTestId('view')).not.toHaveTextContent('Hello');\n */\n toHaveTextContent(expectedText: TextMatch, options?: TextMatchOptions): R;\n}\n\n// Implicit Jest global `expect`.\ndeclare global {\n namespace jest {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface Matchers<R, T = {}> extends JestNativeMatchers<R> {}\n }\n}\n\n// Explicit `@jest/globals` `expect` matchers.\n// @ts-ignore\ndeclare module '@jest/expect' {\n interface Matchers<R extends void | Promise<void>> extends JestNativeMatchers<R> {}\n}\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/matchers/types.ts"],"sourcesContent":["import type { StyleProp } from 'react-native';\nimport type { ReactTestInstance } from 'react-test-renderer';\nimport { AccessibilityValueMatcher } from '../helpers/matchers/match-accessibility-value';\nimport { TextMatch, TextMatchOptions } from '../matches';\nimport { Style } from './to-have-style';\n\nexport interface JestNativeMatchers<R> {\n /**\n * Assert whether a host element is present in the element tree (screen) or not.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeonthescreen)\n *\n * @example\n * <Text>Hello</Text>\n *\n * expect(getByText('Hello')).toBeOnTheScreen()\n * expect(queryByText('Other')).not.toBeOnTheScreen()\n */\n toBeOnTheScreen(): R;\n\n /**\n * Assert whether a host element is checked based on accessibility props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobechecked)\n *\n * @see {@link toBePartiallyChecked} for a related matcher.\n *\n * @example\n * <View accessible role=\"checkbox\" aria-checked aria-label=\"Enable\" />\n *\n * expect(getByRole('checkbox', { name: \"Enable\" })).toBeChecked()\n */\n toBeChecked(): R;\n\n /**\n * Assert whether a host element is collapsed based on accessibility props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeexpanded)\n *\n * @see {@link toBeExpanded} for an inverse matcher.\n *\n * @example\n * <View testID=\"details\" aria-expanded={false} />\n *\n * expect(getByTestId('details').toBeCollapsed()\n */\n toBeCollapsed(): R;\n\n /**\n * Assert whether a host element is disabled based on accessibility props.\n *\n * This matcher will check ancestor elements for their disabled state as well.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeenabled)\n *\n * @see {@link toBeEnabled} for an inverse matcher.\n *\n * @example\n * <View role=\"button\" aria-disabled />\n *\n * expect(getByRole('button').toBeDisabled()\n *\n */\n toBeDisabled(): R;\n\n /**\n * Assert whether a host element is busy based on accessibility props.\n *\n * This matcher will check ancestor elements for their disabled state as well.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobebusy)\n *\n * @example\n * <View testID=\"loader\" aria-busy />\n *\n * expect(getByTestId('loader')).toBeBusy()\n */\n toBeBusy(): R;\n\n /**\n * Assert whether a host element has no host children or text content.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeemptyelement)\n *\n * @example\n * <View testID=\"not-empty\">\n * <View testID=\"empty\" />\n * </View>\n *\n * expect(getByTestId('empty')).toBeEmptyElement()\n * expect(getByTestId('not-mepty')).not.toBeEmptyElement()\n */\n toBeEmptyElement(): R;\n\n /**\n * Assert whether a host element is enabled based on accessibility props.\n *\n * This matcher will check ancestor elements for their disabled state as well.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeenabled)\n *\n * @see {@link toBeDisabled} for inverse matcher.\n *\n * @example\n * <View role=\"button\" aria-disabled={false} />\n *\n * expect(getByRole('button').toBeEnabled()\n */\n toBeEnabled(): R;\n\n /**\n * Assert whether a host element is expanded based on accessibility props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeexpanded)\n *\n * @see {@link toBeCollapsed} for inverse matcher.\n *\n * @example\n * <View testID=\"details\" aria-expanded />\n *\n * expect(getByTestId('details').toBeExpanded()\n */\n toBeExpanded(): R;\n\n /**\n * Assert whether a host element is partially checked based on accessibility props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobechecked)\n *\n * @see {@link toBeChecked} for related matcher.\n *\n * @example\n * <View accessible role=\"checkbox\" aria-checked=\"mixed\" aria-label=\"Enable\" />\n *\n * expect(getByRole('checkbox', { name: \"Enable\" })).toBePartiallyChecked()\n */\n toBePartiallyChecked(): R;\n\n /**\n * Assert whether a host element is selected based on accessibility props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobeselected)\n *\n * @example\n * <View testID=\"view\" aria-selected />\n *\n * expect(getByTestId('view')).toBeSelected()\n */\n toBeSelected(): R;\n\n /**\n * Assert whether a host element is visible based on style and accessibility props.\n *\n * This matcher will check ancestor elements for their visibility as well.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tobevisible)\n *\n * @example\n * <View testID=\"visible\" />\n * <View testID=\"not-visible\" style={{ display: 'none' }} />\n *\n * expect(getByTestId('visible')).toBeVisible()\n * expect(getByTestId('not-visible')).not.toBeVisible()\n */\n toBeVisible(): R;\n\n /**\n * Assert whether a host element contains another host element.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tocontainelement)\n *\n * @example\n * <View testID=\"outer\">\n * <View testID=\"inner\" />\n * </View>\n *\n * expect(getByTestId('outer')).toContainElement(getByTestId('inner'));\n */\n toContainElement(element: ReactTestInstance | null): R;\n\n /**\n * Assert whether a host element has a given accessbility value.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohaveaccessibilityvalue)\n *\n *\n * @example\n * <View testID=\"view\" aria-valuetext=\"33%\" />\n *\n * expect(getByTestId('view')).toHaveAccessibilityValue({ text: '33%' });\n */\n toHaveAccessibilityValue(expectedValue: AccessibilityValueMatcher): R;\n\n /**\n * Assert whether a host element has a given accessibile name based on the accessibility label or text content.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohaveaccessiblename)\n *\n * @example\n * <View testID=\"view\" aria-label=\"Hello\" />\n *\n * expect(getByTestId('view')).toHaveAccessibleName('Hello');\n */\n toHaveAccessibleName(expectedName?: TextMatch, options?: TextMatchOptions): R;\n\n /**\n * Assert whether a host `TextInput` element has a given display value based on `value` and `defaultValue` props.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohavedisplayvalue)\n *\n * @example\n * <TextInput testID=\"input\" value=\"Hello\" />\n *\n * expect(getByTestId('input')).toHaveDisplayValue('Hello');\n */\n toHaveDisplayValue(expectedValue: TextMatch, options?: TextMatchOptions): R;\n\n /**\n * Assert whether a host element has a given prop.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohaveprop)\n *\n * @example\n * <Text testID=\"text\" numberOfLines={1]} />\n *\n * expect(getByTestId('text')).toHaveProp('numberOfLines');\n * expect(getByTestId('text')).toHaveProp('numberOfLines', 1);\n */\n toHaveProp(name: string, expectedValue?: unknown): R;\n\n /**\n * Assert whether a host element has a given style.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohavestyle)\n *\n * @example\n * <View testID=\"view\" style={{ width: '100%' }} />\n *\n * expect(getByTestId('view')).toHaveStyle({ width: '100%' });\n * expect(getByTestId('view')).not.toHaveStyle({ width: '50%' });\n */\n toHaveStyle(style: StyleProp<Style>): R;\n\n /**\n * Assert whether a host element has a given text content.\n *\n * @see\n * [Jest Matchers docs](https://callstack.github.io/react-native-testing-library/docs/jest-matchers#tohavetextcontent)\n *\n * @example\n * <View testID=\"view\">\n * <Text>Hello World</Text>\n * </View>\n *\n * expect(getByTestId('view')).toHaveTextContent('Hello World');\n * expect(getByTestId('view')).toHaveTextContent('Hello', { exact: false }});\n * expect(getByTestId('view')).toHaveTextContent(/hello/i);\n * expect(getByTestId('view')).not.toHaveTextContent('Hello');\n */\n toHaveTextContent(expectedText: TextMatch, options?: TextMatchOptions): R;\n}\n\n// Implicit Jest global `expect`.\ndeclare global {\n namespace jest {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface Matchers<R, T = {}> extends JestNativeMatchers<R> {}\n }\n}\n\n// Explicit `@jest/globals` `expect` matchers.\n// @ts-ignore\ndeclare module '@jest/expect' {\n interface Matchers<R extends void | Promise<void>> extends JestNativeMatchers<R> {}\n}\n"],"mappings":"","ignoreList":[]}
@@ -14,7 +14,7 @@ var _componentTree = require("../helpers/component-tree");
14
14
  var _formatDefault = require("../helpers/format-default");
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  class HostElementTypeError extends Error {
19
19
  constructor(received, matcherFn, context) {
20
20
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["_jestMatcherUtils","require","_prettyFormat","_interopRequireWildcard","_redent","_interopRequireDefault","_componentTree","_formatDefault","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","HostElementTypeError","Error","constructor","received","matcherFn","context","captureStackTrace","withType","printWithType","printReceived","message","matcherHint","isNot","name","RECEIVED_COLOR","join","checkHostElement","element","isHostElement","formatElement","children","props","childrenToDisplay","undefined","redent","prettyFormat","$$typeof","Symbol","for","type","defaultMapProps","plugins","ReactTestComponent","ReactElement","printFunctionName","printBasicPrototype","highlight","formatElementArray","elements","length","map","formatMessage","matcher","expectedLabel","expectedValue","receivedLabel","receivedValue","EXPECTED_COLOR","formatValue","value","stringify"],"sources":["../../src/matchers/utils.tsx"],"sourcesContent":["import { ReactTestInstance } from 'react-test-renderer';\nimport {\n EXPECTED_COLOR,\n RECEIVED_COLOR,\n matcherHint,\n printWithType,\n printReceived,\n stringify,\n} from 'jest-matcher-utils';\nimport prettyFormat, { plugins } from 'pretty-format';\nimport redent from 'redent';\nimport { isHostElement } from '../helpers/component-tree';\nimport { defaultMapProps } from '../helpers/format-default';\n\nclass HostElementTypeError extends Error {\n constructor(received: unknown, matcherFn: jest.CustomMatcher, context: jest.MatcherContext) {\n super();\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, matcherFn);\n }\n\n let withType = '';\n try {\n withType = printWithType('Received', received, printReceived);\n /* istanbul ignore next */\n } catch (e) {\n // Deliberately empty.\n }\n\n this.message = [\n matcherHint(`${context.isNot ? '.not' : ''}.${matcherFn.name}`, 'received', ''),\n '',\n `${RECEIVED_COLOR('received')} value must be a host element.`,\n withType,\n ].join('\\n');\n }\n}\n\n/**\n * Throws HostElementTypeError if passed element is not a host element.\n *\n * @param element ReactTestInstance to check.\n * @param matcherFn Matcher function calling the check used for formatting error.\n * @param context Jest matcher context used for formatting error.\n */\nexport function checkHostElement(\n element: ReactTestInstance | null | undefined,\n matcherFn: jest.CustomMatcher,\n context: jest.MatcherContext,\n): asserts element is ReactTestInstance {\n if (!isHostElement(element)) {\n throw new HostElementTypeError(element, matcherFn, context);\n }\n}\n\n/***\n * Format given element as a pretty-printed string.\n *\n * @param element Element to format.\n */\nexport function formatElement(element: ReactTestInstance | null) {\n if (element == null) {\n return ' null';\n }\n\n const { children, ...props } = element.props;\n const childrenToDisplay = typeof children === 'string' ? [children] : undefined;\n\n return redent(\n prettyFormat(\n {\n // This prop is needed persuade the prettyFormat that the element is\n // a ReactTestRendererJSON instance, so it is formatted as JSX.\n $$typeof: Symbol.for('react.test.json'),\n type: element.type,\n props: defaultMapProps(props),\n children: childrenToDisplay,\n },\n {\n plugins: [plugins.ReactTestComponent, plugins.ReactElement],\n printFunctionName: false,\n printBasicPrototype: false,\n highlight: true,\n },\n ),\n 2,\n );\n}\n\nexport function formatElementArray(elements: ReactTestInstance[]) {\n if (elements.length === 0) {\n return ' (no elements)';\n }\n\n return redent(elements.map(formatElement).join('\\n'), 2);\n}\n\nexport function formatMessage(\n matcher: string,\n expectedLabel: string,\n expectedValue: string | RegExp | null | undefined,\n receivedLabel: string,\n receivedValue: string | null | undefined,\n) {\n return [\n `${matcher}\\n`,\n `${expectedLabel}:\\n${EXPECTED_COLOR(redent(formatValue(expectedValue), 2))}`,\n `${receivedLabel}:\\n${RECEIVED_COLOR(redent(formatValue(receivedValue), 2))}`,\n ].join('\\n');\n}\n\nfunction formatValue(value: unknown) {\n return typeof value === 'string' ? value : stringify(value);\n}\n"],"mappings":";;;;;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAQA,IAAAC,aAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AAA4D,SAAAI,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,CAAAL,CAAA,OAAAM,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAZ,CAAA,oBAAAY,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAY,CAAA,SAAAI,CAAA,GAAAR,CAAA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AAEC,aAAc,MAAK,IAAAI,gCAAc,EAAC,IAAAvB,eAAM,EAACwB,WAAW,CAACJ,aAAa,CAAC,EAAE,CAAC,CAAC,CAAE,EAAC,EAC5E,GAAEC,aAAc,MAAK,IAAA/B,gCAAc,EAAC,IAAAU,eAAM,EAACwB,WAAW,CAACF,aAAa,CAAC,EAAE,CAAC,CAAC,CAAE,EAAC,CAC9E,CAAC/B,IAAI,CAAC,IAAI,CAAC;AACd;AAEA,SAASiC,WAAWA,CAACC,KAAc,EAAE;EACnC,OAAO,OAAOA,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAG,IAAAC,2BAAS,EAACD,KAAK,CAAC;AAC7D"}
1
+ {"version":3,"file":"utils.js","names":["_jestMatcherUtils","require","_prettyFormat","_interopRequireWildcard","_redent","_interopRequireDefault","_componentTree","_formatDefault","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","HostElementTypeError","Error","constructor","received","matcherFn","context","captureStackTrace","withType","printWithType","printReceived","message","matcherHint","isNot","name","RECEIVED_COLOR","join","checkHostElement","element","isHostElement","formatElement","children","props","childrenToDisplay","undefined","redent","prettyFormat","$$typeof","Symbol","for","type","defaultMapProps","plugins","ReactTestComponent","ReactElement","printFunctionName","printBasicPrototype","highlight","formatElementArray","elements","length","map","formatMessage","matcher","expectedLabel","expectedValue","receivedLabel","receivedValue","EXPECTED_COLOR","formatValue","value","stringify"],"sources":["../../src/matchers/utils.tsx"],"sourcesContent":["import { ReactTestInstance } from 'react-test-renderer';\nimport {\n EXPECTED_COLOR,\n RECEIVED_COLOR,\n matcherHint,\n printWithType,\n printReceived,\n stringify,\n} from 'jest-matcher-utils';\nimport prettyFormat, { plugins } from 'pretty-format';\nimport redent from 'redent';\nimport { isHostElement } from '../helpers/component-tree';\nimport { defaultMapProps } from '../helpers/format-default';\n\nclass HostElementTypeError extends Error {\n constructor(received: unknown, matcherFn: jest.CustomMatcher, context: jest.MatcherContext) {\n super();\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, matcherFn);\n }\n\n let withType = '';\n try {\n withType = printWithType('Received', received, printReceived);\n /* istanbul ignore next */\n } catch (e) {\n // Deliberately empty.\n }\n\n this.message = [\n matcherHint(`${context.isNot ? '.not' : ''}.${matcherFn.name}`, 'received', ''),\n '',\n `${RECEIVED_COLOR('received')} value must be a host element.`,\n withType,\n ].join('\\n');\n }\n}\n\n/**\n * Throws HostElementTypeError if passed element is not a host element.\n *\n * @param element ReactTestInstance to check.\n * @param matcherFn Matcher function calling the check used for formatting error.\n * @param context Jest matcher context used for formatting error.\n */\nexport function checkHostElement(\n element: ReactTestInstance | null | undefined,\n matcherFn: jest.CustomMatcher,\n context: jest.MatcherContext,\n): asserts element is ReactTestInstance {\n if (!isHostElement(element)) {\n throw new HostElementTypeError(element, matcherFn, context);\n }\n}\n\n/***\n * Format given element as a pretty-printed string.\n *\n * @param element Element to format.\n */\nexport function formatElement(element: ReactTestInstance | null) {\n if (element == null) {\n return ' null';\n }\n\n const { children, ...props } = element.props;\n const childrenToDisplay = typeof children === 'string' ? [children] : undefined;\n\n return redent(\n prettyFormat(\n {\n // This prop is needed persuade the prettyFormat that the element is\n // a ReactTestRendererJSON instance, so it is formatted as JSX.\n $$typeof: Symbol.for('react.test.json'),\n type: element.type,\n props: defaultMapProps(props),\n children: childrenToDisplay,\n },\n {\n plugins: [plugins.ReactTestComponent, plugins.ReactElement],\n printFunctionName: false,\n printBasicPrototype: false,\n highlight: true,\n },\n ),\n 2,\n );\n}\n\nexport function formatElementArray(elements: ReactTestInstance[]) {\n if (elements.length === 0) {\n return ' (no elements)';\n }\n\n return redent(elements.map(formatElement).join('\\n'), 2);\n}\n\nexport function formatMessage(\n matcher: string,\n expectedLabel: string,\n expectedValue: string | RegExp | null | undefined,\n receivedLabel: string,\n receivedValue: string | null | undefined,\n) {\n return [\n `${matcher}\\n`,\n `${expectedLabel}:\\n${EXPECTED_COLOR(redent(formatValue(expectedValue), 2))}`,\n `${receivedLabel}:\\n${RECEIVED_COLOR(redent(formatValue(receivedValue), 2))}`,\n ].join('\\n');\n}\n\nfunction formatValue(value: unknown) {\n return typeof value === 'string' ? value : stringify(value);\n}\n"],"mappings":";;;;;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAQA,IAAAC,aAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AAA4D,SAAAI,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,CAAAL,CAAA,OAAAM,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAZ,CAAA,oBAAAY,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAd,CAAA,EAAAY,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wB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,gCAAc,EAAC,IAAAvB,eAAM,EAACwB,WAAW,CAACJ,aAAa,CAAC,EAAE,CAAC,CAAC,CAAE,EAAC,EAC5E,GAAEC,aAAc,MAAK,IAAA/B,gCAAc,EAAC,IAAAU,eAAM,EAACwB,WAAW,CAACF,aAAa,CAAC,EAAE,CAAC,CAAC,CAAE,EAAC,CAC9E,CAAC/B,IAAI,CAAC,IAAI,CAAC;AACd;AAEA,SAASiC,WAAWA,CAACC,KAAc,EAAE;EACnC,OAAO,OAAOA,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAG,IAAAC,2BAAS,EAACD,KAAK,CAAC;AAC7D","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"matches.js","names":["matches","matcher","text","normalizer","getDefaultNormalizer","exact","normalizedText","normalizedMatcher","toLowerCase","includes","lastIndex","test","trim","collapseWhitespace","replace"],"sources":["../src/matches.ts"],"sourcesContent":["export type NormalizerFn = (textToNormalize: string) => string;\n\nexport type TextMatch = string | RegExp;\nexport type TextMatchOptions = {\n exact?: boolean;\n normalizer?: NormalizerFn;\n};\n\nexport function matches(\n matcher: TextMatch,\n text: string | undefined,\n normalizer: NormalizerFn = getDefaultNormalizer(),\n exact: boolean = true,\n): boolean {\n if (typeof text !== 'string') {\n return false;\n }\n\n const normalizedText = normalizer(text);\n if (typeof matcher === 'string') {\n const normalizedMatcher = normalizer(matcher);\n return exact\n ? normalizedText === normalizedMatcher\n : normalizedText.toLowerCase().includes(normalizedMatcher.toLowerCase());\n } else {\n // Reset state for global regexes: https://stackoverflow.com/a/1520839/484499\n matcher.lastIndex = 0;\n return matcher.test(normalizedText);\n }\n}\n\ntype NormalizerConfig = {\n trim?: boolean;\n collapseWhitespace?: boolean;\n};\n\nexport function getDefaultNormalizer({\n trim = true,\n collapseWhitespace = true,\n}: NormalizerConfig = {}): NormalizerFn {\n return (text: string) => {\n let normalizedText = text;\n normalizedText = trim ? normalizedText.trim() : normalizedText;\n normalizedText = collapseWhitespace ? normalizedText.replace(/\\s+/g, ' ') : normalizedText;\n return normalizedText;\n };\n}\n"],"mappings":";;;;;;;AAQO,SAASA,OAAOA,CACrBC,OAAkB,EAClBC,IAAwB,EACxBC,UAAwB,GAAGC,oBAAoB,CAAC,CAAC,EACjDC,KAAc,GAAG,IAAI,EACZ;EACT,IAAI,OAAOH,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAO,KAAK;EACd;EAEA,MAAMI,cAAc,GAAGH,UAAU,CAACD,IAAI,CAAC;EACvC,IAAI,OAAOD,OAAO,KAAK,QAAQ,EAAE;IAC/B,MAAMM,iBAAiB,GAAGJ,UAAU,CAACF,OAAO,CAAC;IAC7C,OAAOI,KAAK,GACRC,cAAc,KAAKC,iBAAiB,GACpCD,cAAc,CAACE,WAAW,CAAC,CAAC,CAACC,QAAQ,CAACF,iBAAiB,CAACC,WAAW,CAAC,CAAC,CAAC;EAC5E,CAAC,MAAM;IACL;IACAP,OAAO,CAACS,SAAS,GAAG,CAAC;IACrB,OAAOT,OAAO,CAACU,IAAI,CAACL,cAAc,CAAC;EACrC;AACF;AAOO,SAASF,oBAAoBA,CAAC;EACnCQ,IAAI,GAAG,IAAI;EACXC,kBAAkB,GAAG;AACL,CAAC,GAAG,CAAC,CAAC,EAAgB;EACtC,OAAQX,IAAY,IAAK;IACvB,IAAII,cAAc,GAAGJ,IAAI;IACzBI,cAAc,GAAGM,IAAI,GAAGN,cAAc,CAACM,IAAI,CAAC,CAAC,GAAGN,cAAc;IAC9DA,cAAc,GAAGO,kBAAkB,GAAGP,cAAc,CAACQ,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,GAAGR,cAAc;IAC1F,OAAOA,cAAc;EACvB,CAAC;AACH"}
1
+ {"version":3,"file":"matches.js","names":["matches","matcher","text","normalizer","getDefaultNormalizer","exact","normalizedText","normalizedMatcher","toLowerCase","includes","lastIndex","test","trim","collapseWhitespace","replace"],"sources":["../src/matches.ts"],"sourcesContent":["export type NormalizerFn = (textToNormalize: string) => string;\n\nexport type TextMatch = string | RegExp;\nexport type TextMatchOptions = {\n exact?: boolean;\n normalizer?: NormalizerFn;\n};\n\nexport function matches(\n matcher: TextMatch,\n text: string | undefined,\n normalizer: NormalizerFn = getDefaultNormalizer(),\n exact: boolean = true,\n): boolean {\n if (typeof text !== 'string') {\n return false;\n }\n\n const normalizedText = normalizer(text);\n if (typeof matcher === 'string') {\n const normalizedMatcher = normalizer(matcher);\n return exact\n ? normalizedText === normalizedMatcher\n : normalizedText.toLowerCase().includes(normalizedMatcher.toLowerCase());\n } else {\n // Reset state for global regexes: https://stackoverflow.com/a/1520839/484499\n matcher.lastIndex = 0;\n return matcher.test(normalizedText);\n }\n}\n\ntype NormalizerConfig = {\n trim?: boolean;\n collapseWhitespace?: boolean;\n};\n\nexport function getDefaultNormalizer({\n trim = true,\n collapseWhitespace = true,\n}: NormalizerConfig = {}): NormalizerFn {\n return (text: string) => {\n let normalizedText = text;\n normalizedText = trim ? normalizedText.trim() : normalizedText;\n normalizedText = collapseWhitespace ? normalizedText.replace(/\\s+/g, ' ') : normalizedText;\n return normalizedText;\n };\n}\n"],"mappings":";;;;;;;AAQO,SAASA,OAAOA,CACrBC,OAAkB,EAClBC,IAAwB,EACxBC,UAAwB,GAAGC,oBAAoB,CAAC,CAAC,EACjDC,KAAc,GAAG,IAAI,EACZ;EACT,IAAI,OAAOH,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAO,KAAK;EACd;EAEA,MAAMI,cAAc,GAAGH,UAAU,CAACD,IAAI,CAAC;EACvC,IAAI,OAAOD,OAAO,KAAK,QAAQ,EAAE;IAC/B,MAAMM,iBAAiB,GAAGJ,UAAU,CAACF,OAAO,CAAC;IAC7C,OAAOI,KAAK,GACRC,cAAc,KAAKC,iBAAiB,GACpCD,cAAc,CAACE,WAAW,CAAC,CAAC,CAACC,QAAQ,CAACF,iBAAiB,CAACC,WAAW,CAAC,CAAC,CAAC;EAC5E,CAAC,MAAM;IACL;IACAP,OAAO,CAACS,SAAS,GAAG,CAAC;IACrB,OAAOT,OAAO,CAACU,IAAI,CAACL,cAAc,CAAC;EACrC;AACF;AAOO,SAASF,oBAAoBA,CAAC;EACnCQ,IAAI,GAAG,IAAI;EACXC,kBAAkB,GAAG;AACL,CAAC,GAAG,CAAC,CAAC,EAAgB;EACtC,OAAQX,IAAY,IAAK;IACvB,IAAII,cAAc,GAAGJ,IAAI;IACzBI,cAAc,GAAGM,IAAI,GAAGN,cAAc,CAACM,IAAI,CAAC,CAAC,GAAGN,cAAc;IAC9DA,cAAc,GAAGO,kBAAkB,GAAGP,cAAc,CAACQ,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,GAAGR,cAAc;IAC1F,OAAOA,cAAc;EACvB,CAAC;AACH","ignoreList":[]}
package/build/pure.d.ts CHANGED
@@ -6,7 +6,7 @@ export { default as waitFor } from './wait-for';
6
6
  export { default as waitForElementToBeRemoved } from './wait-for-element-to-be-removed';
7
7
  export { within, getQueriesForElement } from './within';
8
8
  export { configure, resetToDefaults } from './config';
9
- export { isHiddenFromAccessibility, isInaccessible } from './helpers/accessiblity';
9
+ export { isHiddenFromAccessibility, isInaccessible } from './helpers/accessibility';
10
10
  export { getDefaultNormalizer } from './matches';
11
11
  export { renderHook } from './render-hook';
12
12
  export { screen } from './screen';
package/build/pure.js CHANGED
@@ -42,13 +42,13 @@ Object.defineProperty(exports, "getQueriesForElement", {
42
42
  Object.defineProperty(exports, "isHiddenFromAccessibility", {
43
43
  enumerable: true,
44
44
  get: function () {
45
- return _accessiblity.isHiddenFromAccessibility;
45
+ return _accessibility.isHiddenFromAccessibility;
46
46
  }
47
47
  });
48
48
  Object.defineProperty(exports, "isInaccessible", {
49
49
  enumerable: true,
50
50
  get: function () {
51
- return _accessiblity.isInaccessible;
51
+ return _accessibility.isInaccessible;
52
52
  }
53
53
  });
54
54
  Object.defineProperty(exports, "render", {
@@ -107,7 +107,7 @@ var _waitFor = _interopRequireDefault(require("./wait-for"));
107
107
  var _waitForElementToBeRemoved = _interopRequireDefault(require("./wait-for-element-to-be-removed"));
108
108
  var _within = require("./within");
109
109
  var _config = require("./config");
110
- var _accessiblity = require("./helpers/accessiblity");
110
+ var _accessibility = require("./helpers/accessibility");
111
111
  var _matches = require("./matches");
112
112
  var _renderHook = require("./render-hook");
113
113
  var _screen = require("./screen");
package/build/pure.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pure.js","names":["_act","_interopRequireDefault","require","_cleanup","_fireEvent","_render","_waitFor","_waitForElementToBeRemoved","_within","_config","_accessiblity","_matches","_renderHook","_screen","_userEvent","obj","__esModule","default"],"sources":["../src/pure.ts"],"sourcesContent":["export { default as act } from './act';\nexport { default as cleanup } from './cleanup';\nexport { default as fireEvent } from './fire-event';\nexport { default as render } from './render';\nexport { default as waitFor } from './wait-for';\nexport { default as waitForElementToBeRemoved } from './wait-for-element-to-be-removed';\nexport { within, getQueriesForElement } from './within';\n\nexport { configure, resetToDefaults } from './config';\nexport { isHiddenFromAccessibility, isInaccessible } from './helpers/accessiblity';\nexport { getDefaultNormalizer } from './matches';\nexport { renderHook } from './render-hook';\nexport { screen } from './screen';\nexport { userEvent } from './user-event';\n\nexport type {\n RenderOptions,\n RenderResult,\n RenderResult as RenderAPI,\n DebugFunction,\n} from './render';\nexport type { RenderHookOptions, RenderHookResult } from './render-hook';\nexport type { Config } from './config';\nexport type { UserEventConfig } from './user-event';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,QAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,0BAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AAAyC,SAAAD,uBAAAc,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA"}
1
+ {"version":3,"file":"pure.js","names":["_act","_interopRequireDefault","require","_cleanup","_fireEvent","_render","_waitFor","_waitForElementToBeRemoved","_within","_config","_accessibility","_matches","_renderHook","_screen","_userEvent","obj","__esModule","default"],"sources":["../src/pure.ts"],"sourcesContent":["export { default as act } from './act';\nexport { default as cleanup } from './cleanup';\nexport { default as fireEvent } from './fire-event';\nexport { default as render } from './render';\nexport { default as waitFor } from './wait-for';\nexport { default as waitForElementToBeRemoved } from './wait-for-element-to-be-removed';\nexport { within, getQueriesForElement } from './within';\n\nexport { configure, resetToDefaults } from './config';\nexport { isHiddenFromAccessibility, isInaccessible } from './helpers/accessibility';\nexport { getDefaultNormalizer } from './matches';\nexport { renderHook } from './render-hook';\nexport { screen } from './screen';\nexport { userEvent } from './user-event';\n\nexport type {\n RenderOptions,\n RenderResult,\n RenderResult as RenderAPI,\n DebugFunction,\n} from './render';\nexport type { RenderHookOptions, RenderHookResult } from './render-hook';\nexport type { Config } from './config';\nexport type { UserEventConfig } from './user-event';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,QAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,0BAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AAAyC,SAAAD,uBAAAc,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.bindByA11yStateQueries = void 0;
7
- var _accessiblity = require("../helpers/accessiblity");
7
+ var _accessibility = require("../helpers/accessibility");
8
8
  var _deprecation = require("../helpers/deprecation");
9
9
  var _findAll = require("../helpers/find-all");
10
10
  var _matchAccessibilityState = require("../helpers/matchers/match-accessibility-state");
@@ -14,7 +14,7 @@ const queryAllByA11yState = instance => function queryAllByA11yStateFn(matcher,
14
14
  };
15
15
  const buildErrorMessage = (state = {}) => {
16
16
  const errors = [];
17
- _accessiblity.accessibilityStateKeys.forEach(stateKey => {
17
+ _accessibility.accessibilityStateKeys.forEach(stateKey => {
18
18
  if (state[stateKey] !== undefined) {
19
19
  errors.push(`${stateKey} state: ${state[stateKey]}`);
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"accessibility-state.js","names":["_accessiblity","require","_deprecation","_findAll","_matchAccessibilityState","_makeQueries","queryAllByA11yState","instance","queryAllByA11yStateFn","matcher","queryOptions","findAll","node","matchAccessibilityState","buildErrorMessage","state","errors","accessibilityStateKeys","forEach","stateKey","undefined","push","join","getMultipleError","getMissingError","getBy","getAllBy","queryBy","queryAllBy","findBy","findAllBy","makeQueries","bindByA11yStateQueries","getByA11yState","getAllByA11yState","queryByA11yState","findByA11yState","findAllByA11yState","deprecateQueries","getByAccessibilityState","getAllByAccessibilityState","queryByAccessibilityState","queryAllByAccessibilityState","findByAccessibilityState","findAllByAccessibilityState","exports"],"sources":["../../src/queries/accessibility-state.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { accessibilityStateKeys } from '../helpers/accessiblity';\nimport { deprecateQueries } from '../helpers/deprecation';\nimport { findAll } from '../helpers/find-all';\nimport {\n AccessibilityStateMatcher,\n matchAccessibilityState,\n} from '../helpers/matchers/match-accessibility-state';\nimport { makeQueries } from './make-queries';\nimport type {\n FindAllByQuery,\n FindByQuery,\n GetAllByQuery,\n GetByQuery,\n QueryAllByQuery,\n QueryByQuery,\n} from './make-queries';\nimport { CommonQueryOptions } from './options';\n\nconst queryAllByA11yState = (\n instance: ReactTestInstance,\n): QueryAllByQuery<AccessibilityStateMatcher, CommonQueryOptions> =>\n function queryAllByA11yStateFn(matcher, queryOptions) {\n return findAll(instance, (node) => matchAccessibilityState(node, matcher), queryOptions);\n };\n\nconst buildErrorMessage = (state: AccessibilityStateMatcher = {}) => {\n const errors: string[] = [];\n\n accessibilityStateKeys.forEach((stateKey) => {\n if (state[stateKey] !== undefined) {\n errors.push(`${stateKey} state: ${state[stateKey]}`);\n }\n });\n\n return errors.join(', ');\n};\n\nconst getMultipleError = (state: AccessibilityStateMatcher) =>\n `Found multiple elements with ${buildErrorMessage(state)}`;\n\nconst getMissingError = (state: AccessibilityStateMatcher) =>\n `Unable to find an element with ${buildErrorMessage(state)}`;\n\nconst { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries(\n queryAllByA11yState,\n getMissingError,\n getMultipleError,\n);\n\nexport type ByA11yStateQueries = {\n getByA11yState: GetByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n getAllByA11yState: GetAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n queryByA11yState: QueryByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n queryAllByA11yState: QueryAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n findByA11yState: FindByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n findAllByA11yState: FindAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n\n getByAccessibilityState: GetByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n getAllByAccessibilityState: GetAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n queryByAccessibilityState: QueryByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n queryAllByAccessibilityState: QueryAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n findByAccessibilityState: FindByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n findAllByAccessibilityState: FindAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n};\n\nexport const bindByA11yStateQueries = (instance: ReactTestInstance): ByA11yStateQueries => {\n const getByA11yState = getBy(instance);\n const getAllByA11yState = getAllBy(instance);\n const queryByA11yState = queryBy(instance);\n const queryAllByA11yState = queryAllBy(instance);\n const findByA11yState = findBy(instance);\n const findAllByA11yState = findAllBy(instance);\n\n return {\n ...deprecateQueries(\n {\n getByA11yState,\n getAllByA11yState,\n queryByA11yState,\n queryAllByA11yState,\n findByA11yState,\n findAllByA11yState,\n getByAccessibilityState: getByA11yState,\n getAllByAccessibilityState: getAllByA11yState,\n queryByAccessibilityState: queryByA11yState,\n queryAllByAccessibilityState: queryAllByA11yState,\n findByAccessibilityState: findByA11yState,\n findAllByAccessibilityState: findAllByA11yState,\n },\n 'Use {queryPrefix}ByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead.',\n ),\n };\n};\n"],"mappings":";;;;;;AACA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,G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B,gBAAgB,GAAGR,OAAO,CAACpB,QAAQ,CAAC;EAC1C,MAAMD,mBAAmB,GAAGsB,UAAU,CAACrB,QAAQ,CAAC;EAChD,MAAM6B,eAAe,GAAGP,MAAM,CAACtB,QAAQ,CAAC;EACxC,MAAM8B,kBAAkB,GAAGP,SAAS,CAACvB,QAAQ,CAAC;EAE9C,OAAO;IACL,GAAG,IAAA+B,6BAAgB,EACjB;MACEL,cAAc;MACdC,iBAAiB;MACjBC,gBAAgB;MAChB7B,mBAAmB;MACnB8B,eAAe;MACfC,kBAAkB;MAClBE,uBAAuB,EAAEN,cAAc;MACvCO,0BAA0B,EAAEN,iBAAiB;MAC7CO,yBAAyB,EAAEN,gBAAgB;MAC3CO,4BAA4B,EAAEpC,mBAAmB;MACjDqC,wBAAwB,EAAEP,eAAe;MACzCQ,2BAA2B,EAAEP;IAC/B,CAAC,EACD,wMACF;EACF,CAAC;AACH,CAAC;AAACQ,OAAA,CAAAb,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"file":"accessibility-state.js","names":["_accessibility","require","_deprecation","_findAll","_matchAccessibilityState","_makeQueries","queryAllByA11yState","instance","queryAllByA11yStateFn","matcher","queryOptions","findAll","node","matchAccessibilityState","buildErrorMessage","state","errors","accessibilityStateKeys","forEach","stateKey","undefined","push","join","getMultipleError","getMissingError","getBy","getAllBy","queryBy","queryAllBy","findBy","findAllBy","makeQueries","bindByA11yStateQueries","getByA11yState","getAllByA11yState","queryByA11yState","findByA11yState","findAllByA11yState","deprecateQueries","getByAccessibilityState","getAllByAccessibilityState","queryByAccessibilityState","queryAllByAccessibilityState","findByAccessibilityState","findAllByAccessibilityState","exports"],"sources":["../../src/queries/accessibility-state.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { accessibilityStateKeys } from '../helpers/accessibility';\nimport { deprecateQueries } from '../helpers/deprecation';\nimport { findAll } from '../helpers/find-all';\nimport {\n AccessibilityStateMatcher,\n matchAccessibilityState,\n} from '../helpers/matchers/match-accessibility-state';\nimport { makeQueries } from './make-queries';\nimport type {\n FindAllByQuery,\n FindByQuery,\n GetAllByQuery,\n GetByQuery,\n QueryAllByQuery,\n QueryByQuery,\n} from './make-queries';\nimport { CommonQueryOptions } from './options';\n\nconst queryAllByA11yState = (\n instance: ReactTestInstance,\n): QueryAllByQuery<AccessibilityStateMatcher, CommonQueryOptions> =>\n function queryAllByA11yStateFn(matcher, queryOptions) {\n return findAll(instance, (node) => matchAccessibilityState(node, matcher), queryOptions);\n };\n\nconst buildErrorMessage = (state: AccessibilityStateMatcher = {}) => {\n const errors: string[] = [];\n\n accessibilityStateKeys.forEach((stateKey) => {\n if (state[stateKey] !== undefined) {\n errors.push(`${stateKey} state: ${state[stateKey]}`);\n }\n });\n\n return errors.join(', ');\n};\n\nconst getMultipleError = (state: AccessibilityStateMatcher) =>\n `Found multiple elements with ${buildErrorMessage(state)}`;\n\nconst getMissingError = (state: AccessibilityStateMatcher) =>\n `Unable to find an element with ${buildErrorMessage(state)}`;\n\nconst { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries(\n queryAllByA11yState,\n getMissingError,\n getMultipleError,\n);\n\nexport type ByA11yStateQueries = {\n getByA11yState: GetByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n getAllByA11yState: GetAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n queryByA11yState: QueryByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n queryAllByA11yState: QueryAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n findByA11yState: FindByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n findAllByA11yState: FindAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n\n getByAccessibilityState: GetByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n getAllByAccessibilityState: GetAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n queryByAccessibilityState: QueryByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n queryAllByAccessibilityState: QueryAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n findByAccessibilityState: FindByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n findAllByAccessibilityState: FindAllByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n};\n\nexport const bindByA11yStateQueries = (instance: ReactTestInstance): ByA11yStateQueries => {\n const getByA11yState = getBy(instance);\n const getAllByA11yState = getAllBy(instance);\n const queryByA11yState = queryBy(instance);\n const queryAllByA11yState = queryAllBy(instance);\n const findByA11yState = findBy(instance);\n const findAllByA11yState = findAllBy(instance);\n\n return {\n ...deprecateQueries(\n {\n getByA11yState,\n getAllByA11yState,\n queryByA11yState,\n queryAllByA11yState,\n findByA11yState,\n findAllByA11yState,\n getByAccessibilityState: getByA11yState,\n getAllByAccessibilityState: getAllByA11yState,\n queryByAccessibilityState: queryByA11yState,\n queryAllByAccessibilityState: queryAllByA11yState,\n findByAccessibilityState: findByA11yState,\n findAllByAccessibilityState: findAllByA11yState,\n },\n 'Use {queryPrefix}ByRole(role, { disabled, selected, checked, busy, expanded }) query or built-in Jest matchers: toBeDisabled(), toBeSelected(), toBeChecked(), toBeBusy(), and toBeExpanded() instead.',\n ),\n };\n};\n"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AAIA,IAAAI,YAAA,GAAAJ,OAAA;AAWA,MAAMK,mBAAmB,GACvBC,QAA2B,IAE3B,SAASC,qBAAqBA,CAACC,OAAO,EAAEC,YAAY,EAAE;EACpD,OAAO,IAAAC,gBAAO,EAACJ,QAAQ,EAAGK,IAAI,IAAK,IAAAC,gDAAuB,EAACD,IAAI,EAAEH,OAAO,CAAC,EAAEC,YAAY,CAAC;AAC1F,CAAC;AAEH,MAAMI,iBAAiB,GAAGA,CAACC,KAAgC,GAAG,CAAC,CAAC,KAAK;EACnE,MAAMC,MAAgB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EAAEN,gBAAgB;MAC3CO,4BAA4B,EAAEpC,mBAAmB;MACjDqC,wBAAwB,EAAEP,eAAe;MACzCQ,2BAA2B,EAAEP;IAC/B,CAAC,EACD,wMACF;EACF,CAAC;AACH,CAAC;AAACQ,OAAA,CAAAb,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.bindByA11yValueQueries = void 0;
7
- var _accessiblity = require("../helpers/accessiblity");
7
+ var _accessibility = require("../helpers/accessibility");
8
8
  var _deprecation = require("../helpers/deprecation");
9
9
  var _findAll = require("../helpers/find-all");
10
10
  var _matchAccessibilityValue = require("../helpers/matchers/match-accessibility-value");
@@ -14,7 +14,7 @@ const queryAllByA11yValue = instance => function queryAllByA11yValueFn(value, qu
14
14
  };
15
15
  const formatQueryParams = matcher => {
16
16
  const params = [];
17
- _accessiblity.accessiblityValueKeys.forEach(valueKey => {
17
+ _accessibility.accessibilityValueKeys.forEach(valueKey => {
18
18
  if (matcher[valueKey] !== undefined) {
19
19
  params.push(`${valueKey} value: ${matcher[valueKey]}`);
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"accessibility-value.js","names":["_accessiblity","require","_deprecation","_findAll","_matchAccessibilityValue","_makeQueries","queryAllByA11yValue","instance","queryAllByA11yValueFn","value","queryOptions","findAll","node","matchAccessibilityValue","formatQueryParams","matcher","params","accessiblityValueKeys","forEach","valueKey","undefined","push","join","getMultipleError","getMissingError","getBy","getAllBy","queryBy","queryAllBy","findBy","findAllBy","makeQueries","bindByA11yValueQueries","getByA11yValue","getAllByA11yValue","queryByA11yValue","findByA11yValue","findAllByA11yValue","deprecateQueries","getByAccessibilityValue","getAllByAccessibilityValue","queryByAccessibilityValue","queryAllByAccessibilityValue","findByAccessibilityValue","findAllByAccessibilityValue","exports"],"sources":["../../src/queries/accessibility-value.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { accessiblityValueKeys } from '../helpers/accessiblity';\nimport { deprecateQueries } from '../helpers/deprecation';\nimport { findAll } from '../helpers/find-all';\nimport {\n AccessibilityValueMatcher,\n matchAccessibilityValue,\n} from '../helpers/matchers/match-accessibility-value';\nimport { makeQueries } from './make-queries';\nimport type {\n FindAllByQuery,\n FindByQuery,\n GetAllByQuery,\n GetByQuery,\n QueryAllByQuery,\n QueryByQuery,\n} from './make-queries';\nimport { CommonQueryOptions } from './options';\n\nconst queryAllByA11yValue = (\n instance: ReactTestInstance,\n): QueryAllByQuery<AccessibilityValueMatcher, CommonQueryOptions> =>\n function queryAllByA11yValueFn(value, queryOptions) {\n return findAll(instance, (node) => matchAccessibilityValue(node, value), queryOptions);\n };\n\nconst formatQueryParams = (matcher: AccessibilityValueMatcher) => {\n const params: string[] = [];\n\n accessiblityValueKeys.forEach((valueKey) => {\n if (matcher[valueKey] !== undefined) {\n params.push(`${valueKey} value: ${matcher[valueKey]}`);\n }\n });\n\n return params.join(', ');\n};\n\nconst getMultipleError = (matcher: AccessibilityValueMatcher) =>\n `Found multiple elements with ${formatQueryParams(matcher)}`;\n\nconst getMissingError = (matcher: AccessibilityValueMatcher) =>\n `Unable to find an element with ${formatQueryParams(matcher)}`;\n\nconst { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries(\n queryAllByA11yValue,\n getMissingError,\n getMultipleError,\n);\n\nexport type ByA11yValueQueries = {\n getByA11yValue: GetByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n getAllByA11yValue: GetAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n queryByA11yValue: QueryByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n queryAllByA11yValue: QueryAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n findByA11yValue: FindByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n findAllByA11yValue: FindAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n\n getByAccessibilityValue: GetByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n getAllByAccessibilityValue: GetAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n queryByAccessibilityValue: QueryByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n queryAllByAccessibilityValue: QueryAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n findByAccessibilityValue: FindByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n findAllByAccessibilityValue: FindAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n};\n\nexport const bindByA11yValueQueries = (instance: ReactTestInstance): ByA11yValueQueries => {\n const getByA11yValue = getBy(instance);\n const getAllByA11yValue = getAllBy(instance);\n const queryByA11yValue = queryBy(instance);\n const queryAllByA11yValue = queryAllBy(instance);\n const findByA11yValue = findBy(instance);\n const findAllByA11yValue = findAllBy(instance);\n\n return {\n ...deprecateQueries(\n {\n getByA11yValue,\n getAllByA11yValue,\n queryByA11yValue,\n queryAllByA11yValue,\n findByA11yValue,\n findAllByA11yValue,\n getByAccessibilityValue: getByA11yValue,\n getAllByAccessibilityValue: getAllByA11yValue,\n queryByAccessibilityValue: queryByA11yValue,\n queryAllByAccessibilityValue: queryAllByA11yValue,\n findByAccessibilityValue: findByA11yValue,\n findAllByAccessibilityValue: findAllByA11yValue,\n },\n 'Use toHaveAccessibilityValue(...) built-in Jest matcher or {queryPrefix}ByRole(role, { value: ... }) query instead.',\n ),\n };\n};\n"],"mappings":";;;;;;AACA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AAIA,IAAAI,YAAA,GAAAJ,OAAA;AAWA,MAAMK,mBAAmB,GACvBC,QAA2B,IAE3B,SAASC,qBAAqBA,CAACC,KAAK,EAAEC,YAAY,EAAE;EAClD,OAAO,IAAAC,gBAAO,EAACJ,QAAQ,EAAGK,IAAI,IAAK,IAAAC,gDAAuB,EAACD,IAAI,EAAE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;MACnB8B,eAAe;MACfC,kBAAkB;MAClBE,uBAAuB,EAAEN,cAAc;MACvCO,0BAA0B,EAAEN,iBAAiB;MAC7CO,yBAAyB,EAAEN,gBAAgB;MAC3CO,4BAA4B,EAAEpC,mBAAmB;MACjDqC,wBAAwB,EAAEP,eAAe;MACzCQ,2BAA2B,EAAEP;IAC/B,CAAC,EACD,qHACF;EACF,CAAC;AACH,CAAC;AAACQ,OAAA,CAAAb,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"file":"accessibility-value.js","names":["_accessibility","require","_deprecation","_findAll","_matchAccessibilityValue","_makeQueries","queryAllByA11yValue","instance","queryAllByA11yValueFn","value","queryOptions","findAll","node","matchAccessibilityValue","formatQueryParams","matcher","params","accessibilityValueKeys","forEach","valueKey","undefined","push","join","getMultipleError","getMissingError","getBy","getAllBy","queryBy","queryAllBy","findBy","findAllBy","makeQueries","bindByA11yValueQueries","getByA11yValue","getAllByA11yValue","queryByA11yValue","findByA11yValue","findAllByA11yValue","deprecateQueries","getByAccessibilityValue","getAllByAccessibilityValue","queryByAccessibilityValue","queryAllByAccessibilityValue","findByAccessibilityValue","findAllByAccessibilityValue","exports"],"sources":["../../src/queries/accessibility-value.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { accessibilityValueKeys } from '../helpers/accessibility';\nimport { deprecateQueries } from '../helpers/deprecation';\nimport { findAll } from '../helpers/find-all';\nimport {\n AccessibilityValueMatcher,\n matchAccessibilityValue,\n} from '../helpers/matchers/match-accessibility-value';\nimport { makeQueries } from './make-queries';\nimport type {\n FindAllByQuery,\n FindByQuery,\n GetAllByQuery,\n GetByQuery,\n QueryAllByQuery,\n QueryByQuery,\n} from './make-queries';\nimport { CommonQueryOptions } from './options';\n\nconst queryAllByA11yValue = (\n instance: ReactTestInstance,\n): QueryAllByQuery<AccessibilityValueMatcher, CommonQueryOptions> =>\n function queryAllByA11yValueFn(value, queryOptions) {\n return findAll(instance, (node) => matchAccessibilityValue(node, value), queryOptions);\n };\n\nconst formatQueryParams = (matcher: AccessibilityValueMatcher) => {\n const params: string[] = [];\n\n accessibilityValueKeys.forEach((valueKey) => {\n if (matcher[valueKey] !== undefined) {\n params.push(`${valueKey} value: ${matcher[valueKey]}`);\n }\n });\n\n return params.join(', ');\n};\n\nconst getMultipleError = (matcher: AccessibilityValueMatcher) =>\n `Found multiple elements with ${formatQueryParams(matcher)}`;\n\nconst getMissingError = (matcher: AccessibilityValueMatcher) =>\n `Unable to find an element with ${formatQueryParams(matcher)}`;\n\nconst { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries(\n queryAllByA11yValue,\n getMissingError,\n getMultipleError,\n);\n\nexport type ByA11yValueQueries = {\n getByA11yValue: GetByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n getAllByA11yValue: GetAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n queryByA11yValue: QueryByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n queryAllByA11yValue: QueryAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n findByA11yValue: FindByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n findAllByA11yValue: FindAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n\n getByAccessibilityValue: GetByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n getAllByAccessibilityValue: GetAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n queryByAccessibilityValue: QueryByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n queryAllByAccessibilityValue: QueryAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n findByAccessibilityValue: FindByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n findAllByAccessibilityValue: FindAllByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n};\n\nexport const bindByA11yValueQueries = (instance: ReactTestInstance): ByA11yValueQueries => {\n const getByA11yValue = getBy(instance);\n const getAllByA11yValue = getAllBy(instance);\n const queryByA11yValue = queryBy(instance);\n const queryAllByA11yValue = queryAllBy(instance);\n const findByA11yValue = findBy(instance);\n const findAllByA11yValue = findAllBy(instance);\n\n return {\n ...deprecateQueries(\n {\n getByA11yValue,\n getAllByA11yValue,\n queryByA11yValue,\n queryAllByA11yValue,\n findByA11yValue,\n findAllByA11yValue,\n getByAccessibilityValue: getByA11yValue,\n getAllByAccessibilityValue: getAllByA11yValue,\n queryByAccessibilityValue: queryByA11yValue,\n queryAllByAccessibilityValue: queryAllByA11yValue,\n findByAccessibilityValue: findByA11yValue,\n findAllByAccessibilityValue: findAllByA11yValue,\n },\n 'Use toHaveAccessibilityValue(...) built-in Jest matcher or {queryPrefix}ByRole(role, { value: ... }) query instead.',\n ),\n };\n};\n"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AAIA,IAAAI,YAAA,GAAAJ,OAAA;AAWA,MAAMK,mBAAmB,GACvBC,QAA2B,IAE3B,SAASC,qBAAqBA,CAACC,KAAK,EAAEC,YAAY,EAAE;EAClD,OAAO,IAAAC,gBAAO,EAACJ,QAAQ,EAAGK,IAAI,IAAK,IAAAC,gDAAuB,EAACD,IAAI,EAAEH,KAAK,CAAC,EAAEC,YAAY,CAAC;AACxF,CAAC;AAEH,MAAMI,iBAAiB,GAAIC,OAAkC,IAAK;EAChE,MAAMC,MAAgB,GAAG,EAAE;EAE3BC,qCAAsB,CAACC,OAAO,CAAEC,QAAQ,IAAK;IAC3C,IAAIJ,OAAO,CAACI,QAAQ,CAAC,KAAKC,SAAS,EAAE;MACnCJ,MAAM,CAACK,IAAI,CAAE,GAAEF,QAAS,WAAUJ,OAAO,CAACI,QAAQ,CAAE,EAAC,CAAC;IACxD;EACF,CAAC,CAAC;EAEF,OAAOH,MAAM,CAACM,IAAI,CAAC,IAAI,CAAC;AAC1B,CAAC;AAED,MAAMC,gBAAgB,GAAIR,OAAkC,IACzD,gCAA+BD,iBAAiB,CAACC,OAAO,CAAE,EAAC;AAE9D,MAAMS,eAAe,GAAIT,OAAkC,IACxD,kCAAiCD,iBAAiB,CAACC,OAAO,CAAE,EAAC;AAEhE,MAAM;EAAEU,KAAK;EAAEC,QAAQ;EAAEC,OAAO;EAAEC,UAAU;EAAEC,MAAM;EAAEC;AAAU,CAAC,GAAG,IAAAC,wBAAW,EAC7EzB,mBAAmB,EACnBkB,eAAe,EACfD,gBACF,CAAC;AAkBM,MAAMS,sBAAsB,GAAIzB,QAA2B,IAAyB;EACzF,MAAM0B,cAAc,GAAGR,KAAK,CAAClB,QAAQ,CAAC;EACtC,MAAM2B,iBAAiB,GAAGR,QAAQ,CAACnB,QAAQ,CAAC;EAC5C,MAAM4B,gBAAgB,GAAGR,OAAO,CAACpB,QAAQ,CAAC;EAC1C,MAAMD,mBAAmB,GAAGsB,UAAU,CAACrB,QAAQ,CAAC;EAChD,MAAM6B,eAAe,GAAGP,MAAM,CAACtB,QAAQ,CAAC;EACxC,MAAM8B,kBAAkB,GAAGP,SAAS,CAACvB,QAAQ,CAAC;EAE9C,OAAO;IACL,GAAG,IAAA+B,6BAAgB,EACjB;MACEL,cAAc;MACdC,iBAAiB;MACjBC,gBAAgB;MAChB7B,mBAAmB;MACnB8B,eAAe;MACfC,kBAAkB;MAClBE,uBAAuB,EAAEN,cAAc;MACvCO,0BAA0B,EAAEN,iBAAiB;MAC7CO,yBAAyB,EAAEN,gBAAgB;MAC3CO,4BAA4B,EAAEpC,mBAAmB;MACjDqC,wBAAwB,EAAEP,eAAe;MACzCQ,2BAA2B,EAAEP;IAC/B,CAAC,EACD,qHACF;EACF,CAAC;AACH,CAAC;AAACQ,OAAA,CAAAb,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"display-value.js","names":["_findAll","require","_hostComponentNames","_textInput","_matches","_makeQueries","matchDisplayValue","node","expectedValue","options","exact","normalizer","nodeValue","getTextInputValue","matches","queryAllByDisplayValue","instance","queryAllByDisplayValueFn","displayValue","queryOptions","findAll","isHostTextInput","getMultipleError","String","getMissingError","getBy","getAllBy","queryBy","queryAllBy","findBy","findAllBy","makeQueries","bindByDisplayValueQueries","getByDisplayValue","getAllByDisplayValue","queryByDisplayValue","findByDisplayValue","findAllByDisplayValue","exports"],"sources":["../../src/queries/display-value.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { findAll } from '../helpers/find-all';\nimport { isHostTextInput } from '../helpers/host-component-names';\nimport { getTextInputValue } from '../helpers/text-input';\nimport { matches, TextMatch, TextMatchOptions } from '../matches';\nimport { makeQueries } from './make-queries';\nimport type {\n FindAllByQuery,\n FindByQuery,\n GetAllByQuery,\n GetByQuery,\n QueryAllByQuery,\n QueryByQuery,\n} from './make-queries';\nimport type { CommonQueryOptions } from './options';\n\ntype ByDisplayValueOptions = CommonQueryOptions & TextMatchOptions;\n\nconst matchDisplayValue = (\n node: ReactTestInstance,\n expectedValue: TextMatch,\n options: TextMatchOptions = {},\n) => {\n const { exact, normalizer } = options;\n const nodeValue = getTextInputValue(node);\n return matches(expectedValue, nodeValue, normalizer, exact);\n};\n\nconst queryAllByDisplayValue = (\n instance: ReactTestInstance,\n): QueryAllByQuery<TextMatch, ByDisplayValueOptions> =>\n function queryAllByDisplayValueFn(displayValue, queryOptions) {\n return findAll(\n instance,\n (node) => isHostTextInput(node) && matchDisplayValue(node, displayValue, queryOptions),\n queryOptions,\n );\n };\n\nconst getMultipleError = (displayValue: TextMatch) =>\n `Found multiple elements with display value: ${String(displayValue)} `;\nconst getMissingError = (displayValue: TextMatch) =>\n `Unable to find an element with displayValue: ${String(displayValue)}`;\n\nconst { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries(\n queryAllByDisplayValue,\n getMissingError,\n getMultipleError,\n);\n\nexport type ByDisplayValueQueries = {\n getByDisplayValue: GetByQuery<TextMatch, ByDisplayValueOptions>;\n getAllByDisplayValue: GetAllByQuery<TextMatch, ByDisplayValueOptions>;\n queryByDisplayValue: QueryByQuery<TextMatch, ByDisplayValueOptions>;\n queryAllByDisplayValue: QueryAllByQuery<TextMatch, ByDisplayValueOptions>;\n findByDisplayValue: FindByQuery<TextMatch, ByDisplayValueOptions>;\n findAllByDisplayValue: FindAllByQuery<TextMatch, ByDisplayValueOptions>;\n};\n\nexport const bindByDisplayValueQueries = (instance: ReactTestInstance): ByDisplayValueQueries => ({\n getByDisplayValue: getBy(instance),\n getAllByDisplayValue: getAllBy(instance),\n queryByDisplayValue: queryBy(instance),\n queryAllByDisplayValue: queryAllBy(instance),\n findByDisplayValue: findBy(instance),\n findAllByDisplayValue: findAllBy(instance),\n});\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAaA,MAAMK,iBAAiB,GAAGA,CACxBC,IAAuB,EACvBC,aAAwB,EACxBC,OAAyB,GAAG,CAAC,CAAC,KAC3B;EACH,MAAM;IAAEC,KAAK;IAAEC;EAAW,CAAC,GAAGF,OAAO;EACrC,MAAMG,SAAS,GAAG,IAAAC,4BAAiB,EAACN,IAAI,CAAC;EACzC,OAAO,IAAAO,gBAAO,EAACN,aAAa,EAAEI,SAAS,EAAED,UAAU,EAAED,KAAK,CAAC;AAC7D,CAAC;AAED,MAAMK,sBAAsB,GAC1BC,QAA2B,IAE3B,SAASC,wBAAwBA,CAACC,YAAY,EAAEC,YAAY,EAAE;EAC5D,OAAO,IAAAC,gBAAO,EACZJ,QAAQ,EACPT,IAAI,IAAK,IAAAc,mCAAe,EAACd,IAAI,CAAC,IAAID,iBAAiB,CAACC,IAAI,EAAEW,YAAY,EAAEC,YAAY,CAAC,EACtFA,YACF,CAAC;AACH,CAAC;AAEH,MAAMG,gBAAgB,GAAIJ,YAAuB,IAC9C,+CAA8CK,MAAM,CAACL,YAAY,CAAE,GAAE;AACxE,MAAMM,eAAe,GAAIN,YAAuB,IAC7C,gDAA+CK,MAAM,CAACL,YAAY,CAAE,EAAC;AAExE,MAAM;EAAEO,KAAK;EAAEC,QAAQ;EAAEC,OAAO;EAAEC,UAAU;EAAEC,MAAM;EAAEC;AAAU,CAAC,GAAG,IAAAC,wBAAW,EAC7EhB,sBAAsB,EACtBS,eAAe,EACfF,gBACF,CAAC;AAWM,MAAMU,yBAAyB,GAAIhB,QAA2B,KAA6B;EAChGiB,iBAAiB,EAAER,KAAK,CAACT,QAAQ,CAAC;EAClCkB,oBAAoB,EAAER,QAAQ,CAACV,QAAQ,CAAC;EACxCmB,mBAAmB,EAAER,OAAO,CAACX,QAAQ,CAAC;EACtCD,sBAAsB,EAAEa,UAAU,CAACZ,QAAQ,CAAC;EAC5CoB,kBAAkB,EAAEP,MAAM,CAACb,QAAQ,CAAC;EACpCqB,qBAAqB,EAAEP,SAAS,CAACd,QAAQ;AAC3C,CAAC,CAAC;AAACsB,OAAA,CAAAN,yBAAA,GAAAA,yBAAA"}
1
+ {"version":3,"file":"display-value.js","names":["_findAll","require","_hostComponentNames","_textInput","_matches","_makeQueries","matchDisplayValue","node","expectedValue","options","exact","normalizer","nodeValue","getTextInputValue","matches","queryAllByDisplayValue","instance","queryAllByDisplayValueFn","displayValue","queryOptions","findAll","isHostTextInput","getMultipleError","String","getMissingError","getBy","getAllBy","queryBy","queryAllBy","findBy","findAllBy","makeQueries","bindByDisplayValueQueries","getByDisplayValue","getAllByDisplayValue","queryByDisplayValue","findByDisplayValue","findAllByDisplayValue","exports"],"sources":["../../src/queries/display-value.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { findAll } from '../helpers/find-all';\nimport { isHostTextInput } from '../helpers/host-component-names';\nimport { getTextInputValue } from '../helpers/text-input';\nimport { matches, TextMatch, TextMatchOptions } from '../matches';\nimport { makeQueries } from './make-queries';\nimport type {\n FindAllByQuery,\n FindByQuery,\n GetAllByQuery,\n GetByQuery,\n QueryAllByQuery,\n QueryByQuery,\n} from './make-queries';\nimport type { CommonQueryOptions } from './options';\n\ntype ByDisplayValueOptions = CommonQueryOptions & TextMatchOptions;\n\nconst matchDisplayValue = (\n node: ReactTestInstance,\n expectedValue: TextMatch,\n options: TextMatchOptions = {},\n) => {\n const { exact, normalizer } = options;\n const nodeValue = getTextInputValue(node);\n return matches(expectedValue, nodeValue, normalizer, exact);\n};\n\nconst queryAllByDisplayValue = (\n instance: ReactTestInstance,\n): QueryAllByQuery<TextMatch, ByDisplayValueOptions> =>\n function queryAllByDisplayValueFn(displayValue, queryOptions) {\n return findAll(\n instance,\n (node) => isHostTextInput(node) && matchDisplayValue(node, displayValue, queryOptions),\n queryOptions,\n );\n };\n\nconst getMultipleError = (displayValue: TextMatch) =>\n `Found multiple elements with display value: ${String(displayValue)} `;\nconst getMissingError = (displayValue: TextMatch) =>\n `Unable to find an element with displayValue: ${String(displayValue)}`;\n\nconst { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries(\n queryAllByDisplayValue,\n getMissingError,\n getMultipleError,\n);\n\nexport type ByDisplayValueQueries = {\n getByDisplayValue: GetByQuery<TextMatch, ByDisplayValueOptions>;\n getAllByDisplayValue: GetAllByQuery<TextMatch, ByDisplayValueOptions>;\n queryByDisplayValue: QueryByQuery<TextMatch, ByDisplayValueOptions>;\n queryAllByDisplayValue: QueryAllByQuery<TextMatch, ByDisplayValueOptions>;\n findByDisplayValue: FindByQuery<TextMatch, ByDisplayValueOptions>;\n findAllByDisplayValue: FindAllByQuery<TextMatch, ByDisplayValueOptions>;\n};\n\nexport const bindByDisplayValueQueries = (instance: ReactTestInstance): ByDisplayValueQueries => ({\n getByDisplayValue: getBy(instance),\n getAllByDisplayValue: getAllBy(instance),\n queryByDisplayValue: queryBy(instance),\n queryAllByDisplayValue: queryAllBy(instance),\n findByDisplayValue: findBy(instance),\n findAllByDisplayValue: findAll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Q,CAAC;EACxCmB,mBAAmB,EAAER,OAAO,CAACX,QAAQ,CAAC;EACtCD,sBAAsB,EAAEa,UAAU,CAACZ,QAAQ,CAAC;EAC5CoB,kBAAkB,EAAEP,MAAM,CAACb,QAAQ,CAAC;EACpCqB,qBAAqB,EAAEP,SAAS,CAACd,QAAQ;AAC3C,CAAC,CAAC;AAACsB,OAAA,CAAAN,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"hint-text.js","names":["_findAll","require","_matches","_makeQueries","getNodeByHintText","node","text","options","exact","normalizer","matches","props","accessibilityHint","queryAllByHintText","instance","queryAllByA11yHintFn","hint","queryOptions","findAll","getMultipleError","String","getMissingError","getBy","getAllBy","queryBy","queryAllBy","findBy","findAllBy","makeQueries","bindByHintTextQueries","getByHintText","getAllByHintText","queryByHintText","findByHintText","findAllByHintText","getByA11yHint","getAllByA11yHint","queryByA11yHint","queryAllByA11yHint","findByA11yHint","findAllByA11yHint","getByAccessibilityHint","getAllByAccessibilityHint","queryByAccessibilityHint","queryAllByAccessibilityHint","findByAccessibilityHint","findAllByAccessibilityHint","exports"],"sources":["../../src/queries/hint-text.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { findAll } from '../helpers/find-all';\nimport { matches, TextMatch, TextMatchOptions } from '../matches';\nimport { makeQueries } from './make-queries';\nimport type {\n FindAllByQuery,\n FindByQuery,\n GetAllByQuery,\n GetByQuery,\n QueryAllByQuery,\n QueryByQuery,\n} from './make-queries';\nimport { CommonQueryOptions } from './options';\n\ntype ByHintTextOptions = CommonQueryOptions & TextMatchOptions;\n\nconst getNodeByHintText = (\n node: ReactTestInstance,\n text: TextMatch,\n options: TextMatchOptions = {},\n) => {\n const { exact, normalizer } = options;\n return matches(text, node.props.accessibilityHint, normalizer, exact);\n};\n\nconst queryAllByHintText = (\n instance: ReactTestInstance,\n): QueryAllByQuery<TextMatch, ByHintTextOptions> =>\n function queryAllByA11yHintFn(hint, queryOptions) {\n return findAll(instance, (node) => getNodeByHintText(node, hint, queryOptions), queryOptions);\n };\n\nconst getMultipleError = (hint: TextMatch) =>\n `Found multiple elements with accessibilityHint: ${String(hint)} `;\nconst getMissingError = (hint: TextMatch) =>\n `Unable to find an element with accessibilityHint: ${String(hint)}`;\n\nconst { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries(\n queryAllByHintText,\n getMissingError,\n getMultipleError,\n);\n\nexport type ByHintTextQueries = {\n getByHintText: GetByQuery<TextMatch, ByHintTextOptions>;\n getAllByHintText: GetAllByQuery<TextMatch, ByHintTextOptions>;\n queryByHintText: QueryByQuery<TextMatch, ByHintTextOptions>;\n queryAllByHintText: QueryAllByQuery<TextMatch, ByHintTextOptions>;\n findByHintText: FindByQuery<TextMatch, ByHintTextOptions>;\n findAllByHintText: FindAllByQuery<TextMatch, ByHintTextOptions>;\n\n // a11yHint aliases\n getByA11yHint: GetByQuery<TextMatch, ByHintTextOptions>;\n getAllByA11yHint: GetAllByQuery<TextMatch, ByHintTextOptions>;\n queryByA11yHint: QueryByQuery<TextMatch, ByHintTextOptions>;\n queryAllByA11yHint: QueryAllByQuery<TextMatch, ByHintTextOptions>;\n findByA11yHint: FindByQuery<TextMatch, ByHintTextOptions>;\n findAllByA11yHint: FindAllByQuery<TextMatch, ByHintTextOptions>;\n\n // accessibilityHint aliases\n getByAccessibilityHint: GetByQuery<TextMatch, ByHintTextOptions>;\n getAllByAccessibilityHint: GetAllByQuery<TextMatch, ByHintTextOptions>;\n queryByAccessibilityHint: QueryByQuery<TextMatch, ByHintTextOptions>;\n queryAllByAccessibilityHint: QueryAllByQuery<TextMatch, ByHintTextOptions>;\n findByAccessibilityHint: FindByQuery<TextMatch, ByHintTextOptions>;\n findAllByAccessibilityHint: FindAllByQuery<TextMatch, ByHintTextOptions>;\n};\n\nexport const bindByHintTextQueries = (instance: ReactTestInstance): ByHintTextQueries => {\n const getByHintText = getBy(instance);\n const getAllByHintText = getAllBy(instance);\n const queryByHintText = queryBy(instance);\n const queryAllByHintText = queryAllBy(instance);\n const findByHintText = findBy(instance);\n const findAllByHintText = findAllBy(instance);\n\n return {\n getByHintText,\n getAllByHintText,\n queryByHintText,\n queryAllByHintText,\n findByHintText,\n findAllByHintText,\n\n // a11yHint aliases\n getByA11yHint: getByHintText,\n getAllByA11yHint: getAllByHintText,\n queryByA11yHint: queryByHintText,\n queryAllByA11yHint: queryAllByHintText,\n findByA11yHint: findByHintText,\n findAllByA11yHint: findAllByHintText,\n\n // accessibilityHint aliases\n getByAccessibilityHint: getByHintText,\n getAllByAccessibilityHint: getAllByHintText,\n queryByAccessibilityHint: queryByHintText,\n queryAllByAccessibilityHint: queryAllByHintText,\n findByAccessibilityHint: findByHintText,\n findAllByAccessibilityHint: findAllByHintText,\n };\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAaA,MAAMG,iBAAiB,GAAGA,CACxBC,IAAuB,EACvBC,IAAe,EACfC,OAAyB,GAAG,CAAC,CAAC,KAC3B;EACH,MAAM;IAAEC,KAAK;IAAEC;EAAW,CAAC,GAAGF,OAAO;EACrC,OAAO,IAAAG,gBAAO,EAACJ,IAAI,EAAED,IAAI,CAACM,KAAK,CAACC,iBAAiB,EAAEH,UAAU,EAAED,KAAK,CAAC;AACvE,CAAC;AAED,MAAMK,kBAAkB,GACtBC,QAA2B,IAE3B,SAASC,oBAAoBA,CAACC,IAAI,EAAEC,YAAY,EAAE;EAChD,OAAO,IAAAC,gBAAO,EAACJ,QAAQ,EAAGT,IAAI,IAAKD,iBAAiB,CAACC,IAAI,EAAEW,IAAI,EAAEC,YAAY,CAAC,EAAEA,YAAY,CAAC;AAC/F,CAAC;AAEH,MAAME,gBAAgB,GAAIH,IAAe,IACtC,mDAAkDI,MAAM,CAACJ,IAAI,CAAE,GAAE;AACpE,MAAMK,eAAe,GAAIL,IAAe,IACrC,qDAAoDI,MAAM,CAACJ,IAAI,CAAE,EAAC;AAErE,MAAM;EAAEM,KAAK;EAAEC,QAAQ;EAAEC,OAAO;EAAEC,UAAU;EAAEC,MAAM;EAAEC;AAAU,CAAC,GAAG,IAAAC,wBAAW,EAC7Ef,kBAAkB,EAClBQ,eAAe,EACfF,gBACF,CAAC;AA2BM,MAAMU,qBAAqB,GAAIf,QAA2B,IAAwB;EACvF,MAAMgB,aAAa,GAAGR,KAAK,CAACR,QAAQ,CAAC;EACrC,MAAMiB,gBAAgB,GAAGR,QAAQ,CAACT,QAAQ,CAAC;EAC3C,MAAMkB,eAAe,GAAGR,OAAO,CAACV,QAAQ,CAAC;EACzC,MAAMD,kBAAkB,GAAGY,UAAU,CAACX,QAAQ,CAAC;EAC/C,MAAMmB,cAAc,GAAGP,MAAM,CAACZ,QAAQ,CAAC;EACvC,MAAMoB,iBAAiB,GAAGP,SAAS,CAACb,QAAQ,CAAC;EAE7C,OAAO;IACLgB,aAAa;IACbC,gBAAgB;IAChBC,eAAe;IACfnB,kBAAkB;IAClBoB,cAAc;IACdC,iBAAiB;IAEjB;IACAC,aAAa,EAAEL,aAAa;IAC5BM,gBAAgB,EAAEL,gBAAgB;IAClCM,eAAe,EAAEL,eAAe;IAChCM,kBAAkB,EAAEzB,kBAAkB;IACtC0B,cAAc,EAAEN,cAAc;IAC9BO,iBAAiB,EAAEN,iBAAiB;IAEpC;IACAO,sBAAsB,EAAEX,aAAa;IACrCY,yBAAyB,EAAEX,gBAAgB;IAC3CY,wBAAwB,EAAEX,eAAe;IACzCY,2BAA2B,EAAE/B,kBAAkB;IAC/CgC,uBAAuB,EAAEZ,cAAc;IACvCa,0BAA0B,EAAEZ;EAC9B,CAAC;AACH,CAAC;AAACa,OAAA,CAAAlB,qBAAA,GAAAA,qBAAA"}
1
+ {"version":3,"file":"hint-text.js","names":["_findAll","require","_matches","_makeQueries","getNodeByHintText","node","text","options","exact","normalizer","matches","props","accessibilityHint","queryAllByHintText","instance","queryAllByA11yHintFn","hint","queryOptions","findAll","getMultipleError","String","getMissingError","getBy","getAllBy","queryBy","queryAllBy","findBy","findAllBy","makeQueries","bindByHintTextQueries","getByHintText","getAllByHintText","queryByHintText","findByHintText","findAllByHintText","getByA11yHint","getAllByA11yHint","queryByA11yHint","queryAllByA11yHint","findByA11yHint","findAllByA11yHint","getByAccessibilityHint","getAllByAccessibilityHint","queryByAccessibilityHint","queryAllByAccessibilityHint","findByAccessibilityHint","findAllByAccessibilityHint","exports"],"sources":["../../src/queries/hint-text.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { findAll } from '../helpers/find-all';\nimport { matches, TextMatch, TextMatchOptions } from '../matches';\nimport { makeQueries } from './make-queries';\nimport type {\n FindAllByQuery,\n FindByQuery,\n GetAllByQuery,\n GetByQuery,\n QueryAllByQuery,\n QueryByQuery,\n} from './make-queries';\nimport { CommonQueryOptions } from './options';\n\ntype ByHintTextOptions = CommonQueryOptions & TextMatchOptions;\n\nconst getNodeByHintText = (\n node: ReactTestInstance,\n text: TextMatch,\n options: TextMatchOptions = {},\n) => {\n const { exact, normalizer } = options;\n return matches(text, node.props.accessibilityHint, normalizer, exact);\n};\n\nconst queryAllByHintText = (\n instance: ReactTestInstance,\n): QueryAllByQuery<TextMatch, ByHintTextOptions> =>\n function queryAllByA11yHintFn(hint, queryOptions) {\n return findAll(instance, (node) => getNodeByHintText(node, hint, queryOptions), queryOptions);\n };\n\nconst getMultipleError = (hint: TextMatch) =>\n `Found multiple elements with accessibilityHint: ${String(hint)} `;\nconst getMissingError = (hint: TextMatch) =>\n `Unable to find an element with accessibilityHint: ${String(hint)}`;\n\nconst { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries(\n queryAllByHintText,\n getMissingError,\n getMultipleError,\n);\n\nexport type ByHintTextQueries = {\n getByHintText: GetByQuery<TextMatch, ByHintTextOptions>;\n getAllByHintText: GetAllByQuery<TextMatch, ByHintTextOptions>;\n queryByHintText: QueryByQuery<TextMatch, ByHintTextOptions>;\n queryAllByHintText: QueryAllByQuery<TextMatch, ByHintTextOptions>;\n findByHintText: FindByQuery<TextMatch, ByHintTextOptions>;\n findAllByHintText: FindAllByQuery<TextMatch, ByHintTextOptions>;\n\n // a11yHint aliases\n getByA11yHint: GetByQuery<TextMatch, ByHintTextOptions>;\n getAllByA11yHint: GetAllByQuery<TextMatch, ByHintTextOptions>;\n queryByA11yHint: QueryByQuery<TextMatch, ByHintTextOptions>;\n queryAllByA11yHint: QueryAllByQuery<TextMatch, ByHintTextOptions>;\n findByA11yHint: FindByQuery<TextMatch, ByHintTextOptions>;\n findAllByA11yHint: FindAllByQuery<TextMatch, ByHintTextOptions>;\n\n // accessibilityHint aliases\n getByAccessibilityHint: GetByQuery<TextMatch, ByHintTextOptions>;\n getAllByAccessibilityHint: GetAllByQuery<TextMatch, ByHintTextOptions>;\n queryByAccessibilityHint: QueryByQuery<TextMatch, ByHintTextOptions>;\n queryAllByAccessibilityHint: QueryAllByQuery<TextMatch, ByHintTextOptions>;\n findByAccessibilityHint: FindByQuery<TextMatch, ByHintTextOptions>;\n findAllByAccessibilityHint: FindAllByQuery<TextMatch, ByHintTextOptions>;\n};\n\nexport const bindByHintTextQueries = (instance: ReactTestInstance): ByHintTextQueries => {\n const getByHintText = getBy(instance);\n const getAllByHintText = getAllBy(instance);\n const queryByHintText = queryBy(instance);\n const queryAllByHintText = queryAllBy(instance);\n const findByHintText = findBy(instance);\n const findAllByHintText = findAllBy(instance);\n\n return {\n getByHintText,\n getAllByHintText,\n queryByHintText,\n queryAllByHintText,\n findByHintText,\n findAllByHintText,\n\n // a11yHint aliases\n getByA11yHint: getByHintText,\n getAllByA11yHint: getAllByHintText,\n queryByA11yHint: queryByHintText,\n queryAllByA11yHint: queryAllByHintText,\n findByA11yHint: findByHintText,\n findAllByA11yHint: findAllByHintText,\n\n // accessibilityHint aliases\n getByAccessibilityHint: getByHintText,\n getAllByAccessibilityHint: getAllByHintText,\n queryByAccessibilityHint: queryByHintText,\n queryAllByAccessibilityHint: queryAllByHintText,\n findByAccessibilityHint: findByHintText,\n findAllByAccessibilityHint: findAllByHintText,\n };\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAaA,MAAMG,iBAAiB,GAAGA,CACxBC,IAAuB,EACvBC,IAAe,EACfC,OAAyB,GAAG,CAAC,CAAC,KAC3B;EACH,MAAM;IAAEC,KAAK;IAAEC;EAAW,CAAC,GAAGF,OAAO;EACrC,OAAO,IAAAG,gBAAO,EAACJ,IAAI,EAAED,IAAI,CAACM,KAAK,CAACC,iBAAiB,EAAEH,UAAU,EAAED,KAAK,CAAC;AACvE,CAAC;AAED,MAAMK,kBAAkB,GACtBC,QAA2B,IAE3B,SAASC,oBAAoBA,CAACC,IAAI,EAAEC,YAAY,EAAE;EAChD,OAAO,IAAAC,gBAAO,EAACJ,QAAQ,EAAGT,IAAI,IAAKD,iBAAiB,CAACC,IAAI,EAAEW,IAAI,EAAEC,YAAY,CAAC,EAAEA,YAAY,CAAC;AAC/F,CAAC;AAEH,MAAME,gBAAgB,GAAIH,IAAe,IACtC,mDAAkDI,MAAM,CAACJ,IAAI,CAAE,GAAE;AACpE,MAAMK,eAAe,GAAIL,IAAe,IACrC,qDAAoDI,MAAM,CAACJ,IAAI,CAAE,EAAC;AAErE,MAAM;EAAEM,KAAK;EAAEC,QAAQ;EAAEC,OAAO;EAAEC,UAAU;EAAEC,MAAM;EAAEC;AAAU,CAAC,GAAG,IAAAC,wBAAW,EAC7Ef,kBAAkB,EAClBQ,eAAe,EACfF,gBACF,CAAC;AA2BM,MAAMU,qBAAqB,GAAIf,QAA2B,IAAwB;EACvF,MAAMgB,aAAa,GAAGR,KAAK,CAACR,QAAQ,CAAC;EACrC,MAAMiB,gBAAgB,GAAGR,QAAQ,CAACT,QAAQ,CAAC;EAC3C,MAAMkB,eAAe,GAAGR,OAAO,CAACV,QAAQ,CAAC;EACzC,MAAMD,kBAAkB,GAAGY,UAAU,CAACX,QAAQ,CAAC;EAC/C,MAAMmB,cAAc,GAAGP,MAAM,CAACZ,QAAQ,CAAC;EACvC,MAAMoB,iBAAiB,GAAGP,SAAS,CAACb,QAAQ,CAAC;EAE7C,OAAO;IACLgB,aAAa;IACbC,gBAAgB;IAChBC,eAAe;IACfnB,kBAAkB;IAClBoB,cAAc;IACdC,iBAAiB;IAEjB;IACAC,aAAa,EAAEL,aAAa;IAC5BM,gBAAgB,EAAEL,gBAAgB;IAClCM,eAAe,EAAEL,eAAe;IAChCM,kBAAkB,EAAEzB,kBAAkB;IACtC0B,cAAc,EAAEN,cAAc;IAC9BO,iBAAiB,EAAEN,iBAAiB;IAEpC;IACAO,sBAAsB,EAAEX,aAAa;IACrCY,yBAAyB,EAAEX,gBAAgB;IAC3CY,wBAAwB,EAAEX,eAAe;IACzCY,2BAA2B,EAAE/B,kBAAkB;IAC/CgC,uBAAuB,EAAEZ,cAAc;IACvCa,0BAA0B,EAAEZ;EAC9B,CAAC;AACH,CAAC;AAACa,OAAA,CAAAlB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"label-text.js","names":["_findAll","require","_matchLabelText","_makeQueries","queryAllByLabelText","instance","text","queryOptions","findAll","node","matchLabelText","getMultipleError","labelText","String","getMissingError","getBy","getAllBy","queryBy","queryAllBy","findBy","findAllBy","makeQueries","bindByLabelTextQueries","getByLabelText","getAllByLabelText","queryByLabelText","findByLabelText","findAllByLabelText","exports"],"sources":["../../src/queries/label-text.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { findAll } from '../helpers/find-all';\nimport { TextMatch, TextMatchOptions } from '../matches';\nimport { matchLabelText } from '../helpers/matchers/match-label-text';\nimport { makeQueries } from './make-queries';\nimport type {\n FindAllByQuery,\n FindByQuery,\n GetAllByQuery,\n GetByQuery,\n QueryAllByQuery,\n QueryByQuery,\n} from './make-queries';\nimport { CommonQueryOptions } from './options';\n\ntype ByLabelTextOptions = CommonQueryOptions & TextMatchOptions;\n\nfunction queryAllByLabelText(instance: ReactTestInstance) {\n return (text: TextMatch, queryOptions?: ByLabelTextOptions) => {\n return findAll(\n instance,\n (node) => matchLabelText(instance, node, text, queryOptions),\n queryOptions,\n );\n };\n}\n\nconst getMultipleError = (labelText: TextMatch) =>\n `Found multiple elements with accessibility label: ${String(labelText)} `;\nconst getMissingError = (labelText: TextMatch) =>\n `Unable to find an element with accessibility label: ${String(labelText)}`;\n\nconst { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries(\n queryAllByLabelText,\n getMissingError,\n getMultipleError,\n);\n\nexport type ByLabelTextQueries = {\n getByLabelText: GetByQuery<TextMatch, ByLabelTextOptions>;\n getAllByLabelText: GetAllByQuery<TextMatch, ByLabelTextOptions>;\n queryByLabelText: QueryByQuery<TextMatch, ByLabelTextOptions>;\n queryAllByLabelText: QueryAllByQuery<TextMatch, ByLabelTextOptions>;\n findByLabelText: FindByQuery<TextMatch, ByLabelTextOptions>;\n findAllByLabelText: FindAllByQuery<TextMatch, ByLabelTextOptions>;\n};\n\nexport const bindByLabelTextQueries = (instance: ReactTestInstance): ByLabelTextQueries => ({\n getByLabelText: getBy(instance),\n getAllByLabelText: getAllBy(instance),\n queryByLabelText: queryBy(instance),\n queryAllByLabelText: queryAllBy(instance),\n findByLabelText: findBy(instance),\n findAllByLabelText: findAllBy(instance),\n});\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAaA,SAASG,mBAAmBA,CAACC,QAA2B,EAAE;EACxD,OAAO,CAACC,IAAe,EAAEC,YAAiC,KAAK;IAC7D,OAAO,IAAAC,gBAAO,EACZH,QAAQ,EACPI,IAAI,IAAK,IAAAC,8BAAc,EAACL,QAAQ,EAAEI,IAAI,EAAEH,IAAI,EAAEC,YAAY,CAAC,EAC5DA,YACF,CAAC;EACH,CAAC;AACH;AAEA,MAAMI,gBAAgB,GAAIC,SAAoB,IAC3C,qDAAoDC,MAAM,CAACD,SAAS,CAAE,GAAE;AAC3E,MAAME,eAAe,GAAIF,SAAoB,IAC1C,uDAAsDC,MAAM,CAACD,SAAS,CAAE,EAAC;AAE5E,MAAM;EAAEG,KAAK;EAAEC,QAAQ;EAAEC,OAAO;EAAEC,UAAU;EAAEC,MAAM;EAAEC;AAAU,CAAC,GAAG,IAAAC,wBAAW,EAC7EjB,mBAAmB,EACnBU,eAAe,EACfH,gBACF,CAAC;AAWM,MAAMW,sBAAsB,GAAIjB,QAA2B,KAA0B;EAC1FkB,cAAc,EAAER,KAAK,CAACV,QAAQ,CAAC;EAC/BmB,iBAAiB,EAAER,QAAQ,CAACX,QAAQ,CAAC;EACrCoB,gBAAgB,EAAER,OAAO,CAACZ,QAAQ,CAAC;EACnCD,mBAAmB,EAAEc,UAAU,CAACb,QAAQ,CAAC;EACzCqB,eAAe,EAAEP,MAAM,CAACd,QAAQ,CAAC;EACjCsB,kBAAkB,EAAEP,SAAS,CAACf,QAAQ;AACxC,CAAC,CAAC;AAACuB,OAAA,CAAAN,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"file":"label-text.js","names":["_findAll","require","_matchLabelText","_makeQueries","queryAllByLabelText","instance","text","queryOptions","findAll","node","matchLabelText","getMultipleError","labelText","String","getMissingError","getBy","getAllBy","queryBy","queryAllBy","findBy","findAllBy","makeQueries","bindByLabelTextQueries","getByLabelText","getAllByLabelText","queryByLabelText","findByLabelText","findAllByLabelText","exports"],"sources":["../../src/queries/label-text.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { findAll } from '../helpers/find-all';\nimport { TextMatch, TextMatchOptions } from '../matches';\nimport { matchLabelText } from '../helpers/matchers/match-label-text';\nimport { makeQueries } from './make-queries';\nimport type {\n FindAllByQuery,\n FindByQuery,\n GetAllByQuery,\n GetByQuery,\n QueryAllByQuery,\n QueryByQuery,\n} from './make-queries';\nimport { CommonQueryOptions } from './options';\n\ntype ByLabelTextOptions = CommonQueryOptions & TextMatchOptions;\n\nfunction queryAllByLabelText(instance: ReactTestInstance) {\n return (text: TextMatch, queryOptions?: ByLabelTextOptions) => {\n return findAll(\n instance,\n (node) => matchLabelText(instance, node, text, queryOptions),\n queryOptions,\n );\n };\n}\n\nconst getMultipleError = (labelText: TextMatch) =>\n `Found multiple elements with accessibility label: ${String(labelText)} `;\nconst getMissingError = (labelText: TextMatch) =>\n `Unable to find an element with accessibility label: ${String(labelText)}`;\n\nconst { getBy, getAllBy, queryBy, queryAllBy, findBy, findAllBy } = makeQueries(\n queryAllByLabelText,\n getMissingError,\n getMultipleError,\n);\n\nexport type ByLabelTextQueries = {\n getByLabelText: GetByQuery<TextMatch, ByLabelTextOptions>;\n getAllByLabelText: GetAllByQuery<TextMatch, ByLabelTextOptions>;\n queryByLabelText: QueryByQuery<TextMatch, ByLabelTextOptions>;\n queryAllByLabelText: QueryAllByQuery<TextMatch, ByLabelTextOptions>;\n findByLabelText: FindByQuery<TextMatch, ByLabelTextOptions>;\n findAllByLabelText: FindAllByQuery<TextMatch, ByLabelTextOptions>;\n};\n\nexport const bindByLabelTextQueries = (instance: ReactTestInstance): ByLabelTextQueries => ({\n getByLabelText: getBy(instance),\n getAllByLabelText: getAllBy(instance),\n queryByLabelText: queryBy(instance),\n queryAllByLabelText: queryAllBy(instance),\n findByLabelText: findBy(instance),\n findAllByLabelText: findAllBy(instance),\n});\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAaA,SAASG,mBAAmBA,CAACC,QAA2B,EAAE;EACxD,OAAO,CAACC,IAAe,EAAEC,YAAiC,KAAK;IAC7D,OAAO,IAAAC,gBAAO,EACZH,QAAQ,EACPI,IAAI,IAAK,IAAAC,8BAAc,EAACL,QAAQ,EAAEI,IAAI,EAAEH,IAAI,EAAEC,YAAY,CAAC,EAC5DA,YACF,CAAC;EACH,CAAC;AACH;AAEA,MAAMI,gBAAgB,GAAIC,SAAoB,IAC3C,qDAAoDC,MAAM,CAACD,SAAS,CAAE,GAAE;AAC3E,MAAME,eAAe,GAAIF,SAAoB,IAC1C,uDAAsDC,MAAM,CAACD,SAAS,CAAE,EAAC;AAE5E,MAAM;EAAEG,KAAK;EAAEC,QAAQ;EAAEC,OAAO;EAAEC,UAAU;EAAEC,MAAM;EAAEC;AAAU,CAAC,GAAG,IAAAC,wBAAW,EAC7EjB,mBAAmB,EACnBU,eAAe,EACfH,gBACF,CAAC;AAWM,MAAMW,sBAAsB,GAAIjB,QAA2B,KAA0B;EAC1FkB,cAAc,EAAER,KAAK,CAACV,QAAQ,CAAC;EAC/BmB,iBAAiB,EAAER,QAAQ,CAACX,QAAQ,CAAC;EACrCoB,gBAAgB,EAAER,OAAO,CAACZ,QAAQ,CAAC;EACnCD,mBAAmB,EAAEc,UAAU,CAACb,QAAQ,CAAC;EACzCqB,eAAe,EAAEP,MAAM,CAACd,QAAQ,CAAC;EACjCsB,kBAAkB,EAAEP,SAAS,CAACf,QAAQ;AACxC,CAAC,CAAC;AAACuB,OAAA,CAAAN,sBAAA,GAAAA,sBAAA","ignoreList":[]}