@testing-library/react-native 12.3.1 → 12.3.3

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 (165) hide show
  1. package/README.md +11 -11
  2. package/build/config.d.ts +1 -1
  3. package/build/config.js.map +1 -1
  4. package/build/{fireEvent.js → fire-event.js} +4 -2
  5. package/build/fire-event.js.map +1 -0
  6. package/build/helpers/accessiblity.d.ts +1 -0
  7. package/build/helpers/accessiblity.js +19 -0
  8. package/build/helpers/accessiblity.js.map +1 -1
  9. package/build/helpers/{debugDeep.js → debug-deep.js} +1 -1
  10. package/build/helpers/debug-deep.js.map +1 -0
  11. package/build/helpers/{debugShallow.js → debug-shallow.js} +1 -1
  12. package/build/helpers/debug-shallow.js.map +1 -0
  13. package/build/helpers/{findAll.js → find-all.js} +1 -1
  14. package/build/helpers/find-all.js.map +1 -0
  15. package/build/helpers/format-default.js +3 -19
  16. package/build/helpers/format-default.js.map +1 -1
  17. package/build/helpers/matchers/{accessibilityState.js → match-accessibility-state.js} +1 -1
  18. package/build/helpers/matchers/match-accessibility-state.js.map +1 -0
  19. package/build/helpers/matchers/{accessibilityValue.js → match-accessibility-value.js} +2 -2
  20. package/build/helpers/matchers/match-accessibility-value.js.map +1 -0
  21. package/build/helpers/matchers/{matchArrayProp.js → match-array-prop.js} +1 -1
  22. package/build/helpers/matchers/match-array-prop.js.map +1 -0
  23. package/build/helpers/matchers/{matchLabelText.js → match-label-text.js} +3 -3
  24. package/build/helpers/matchers/match-label-text.js.map +1 -0
  25. package/build/helpers/matchers/{matchObjectProp.js → match-object-prop.js} +1 -1
  26. package/build/helpers/matchers/match-object-prop.js.map +1 -0
  27. package/build/helpers/matchers/{matchStringProp.js → match-string-prop.js} +1 -1
  28. package/build/helpers/matchers/match-string-prop.js.map +1 -0
  29. package/build/helpers/matchers/{matchTextContent.js → match-text-content.js} +1 -1
  30. package/build/helpers/matchers/match-text-content.js.map +1 -0
  31. package/build/helpers/object.d.ts +1 -0
  32. package/build/helpers/object.js +18 -0
  33. package/build/helpers/object.js.map +1 -1
  34. package/build/helpers/{stringValidation.js → string-validation.js} +1 -1
  35. package/build/helpers/string-validation.js.map +1 -0
  36. package/build/index.js +1 -1
  37. package/build/index.js.map +1 -1
  38. package/build/matchers/extend-expect.d.js.map +1 -1
  39. package/build/matchers/extend-expect.js +4 -0
  40. package/build/matchers/extend-expect.js.map +1 -1
  41. package/build/matchers/index.d.ts +2 -0
  42. package/build/matchers/index.js +14 -0
  43. package/build/matchers/index.js.map +1 -1
  44. package/build/matchers/to-have-accessibility-value.d.ts +7 -0
  45. package/build/matchers/to-have-accessibility-value.js +23 -0
  46. package/build/matchers/to-have-accessibility-value.js.map +1 -0
  47. package/build/matchers/to-have-accessible-name.d.ts +7 -0
  48. package/build/matchers/to-have-accessible-name.js +28 -0
  49. package/build/matchers/to-have-accessible-name.js.map +1 -0
  50. package/build/matchers/utils.d.ts +1 -1
  51. package/build/matchers/utils.js.map +1 -1
  52. package/build/pure.d.ts +5 -5
  53. package/build/pure.js +4 -4
  54. package/build/pure.js.map +1 -1
  55. package/build/queries/{a11yState.d.ts → accessibility-state.d.ts} +2 -2
  56. package/build/queries/{a11yState.js → accessibility-state.js} +5 -5
  57. package/build/queries/accessibility-state.js.map +1 -0
  58. package/build/queries/{a11yValue.d.ts → accessibility-value.d.ts} +2 -2
  59. package/build/queries/{a11yValue.js → accessibility-value.js} +5 -5
  60. package/build/queries/accessibility-value.js.map +1 -0
  61. package/build/queries/{displayValue.d.ts → display-value.d.ts} +1 -1
  62. package/build/queries/{displayValue.js → display-value.js} +3 -3
  63. package/build/queries/display-value.js.map +1 -0
  64. package/build/queries/{hintText.d.ts → hint-text.d.ts} +1 -1
  65. package/build/queries/{hintText.js → hint-text.js} +3 -3
  66. package/build/queries/hint-text.js.map +1 -0
  67. package/build/queries/{labelText.d.ts → label-text.d.ts} +1 -1
  68. package/build/queries/{labelText.js → label-text.js} +4 -4
  69. package/build/queries/label-text.js.map +1 -0
  70. package/build/queries/{makeQueries.d.ts → make-queries.d.ts} +1 -1
  71. package/build/queries/{makeQueries.js → make-queries.js} +2 -2
  72. package/build/queries/make-queries.js.map +1 -0
  73. package/build/queries/{placeholderText.d.ts → placeholder-text.d.ts} +1 -1
  74. package/build/queries/{placeholderText.js → placeholder-text.js} +3 -3
  75. package/build/queries/placeholder-text.js.map +1 -0
  76. package/build/queries/role.d.ts +3 -3
  77. package/build/queries/role.js +7 -7
  78. package/build/queries/role.js.map +1 -1
  79. package/build/queries/{testId.d.ts → test-id.d.ts} +1 -1
  80. package/build/queries/{testId.js → test-id.js} +3 -3
  81. package/build/queries/test-id.js.map +1 -0
  82. package/build/queries/text.d.ts +1 -1
  83. package/build/queries/text.js +3 -3
  84. package/build/queries/text.js.map +1 -1
  85. package/build/queries/{unsafeProps.js → unsafe-props.js} +1 -1
  86. package/build/queries/unsafe-props.js.map +1 -0
  87. package/build/queries/{unsafeType.js → unsafe-type.js} +1 -1
  88. package/build/queries/unsafe-type.js.map +1 -0
  89. package/build/render-act.js +3 -1
  90. package/build/render-act.js.map +1 -1
  91. package/build/{renderHook.js → render-hook.js} +1 -1
  92. package/build/render-hook.js.map +1 -0
  93. package/build/render.d.ts +169 -169
  94. package/build/render.js +5 -5
  95. package/build/render.js.map +1 -1
  96. package/build/user-event/scroll/index.d.ts +1 -1
  97. package/build/user-event/scroll/index.js +1 -1
  98. package/build/user-event/scroll/index.js.map +1 -1
  99. package/build/user-event/scroll/{scrollTo.js → scroll-to.js} +1 -1
  100. package/build/user-event/scroll/scroll-to.js.map +1 -0
  101. package/build/user-event/setup/setup.js.map +1 -1
  102. package/build/user-event/type/{parseKeys.js → parse-keys.js} +1 -1
  103. package/build/user-event/type/parse-keys.js.map +1 -0
  104. package/build/user-event/type/type.js +1 -1
  105. package/build/user-event/type/type.js.map +1 -1
  106. package/build/user-event/utils/dispatch-event.js +3 -1
  107. package/build/user-event/utils/dispatch-event.js.map +1 -1
  108. package/build/{waitForElementToBeRemoved.d.ts → wait-for-element-to-be-removed.d.ts} +1 -1
  109. package/build/{waitForElementToBeRemoved.js → wait-for-element-to-be-removed.js} +3 -3
  110. package/build/wait-for-element-to-be-removed.js.map +1 -0
  111. package/build/{waitFor.js → wait-for.js} +2 -2
  112. package/build/wait-for.js.map +1 -0
  113. package/build/within.d.ts +84 -84
  114. package/build/within.js +11 -11
  115. package/build/within.js.map +1 -1
  116. package/extend-expect.d.ts +1 -0
  117. package/extend-expect.js +1 -0
  118. package/package.json +10 -7
  119. package/pure.d.ts +1 -0
  120. package/src/matchers/extend-expect.d.ts +40 -0
  121. package/build/fireEvent.js.map +0 -1
  122. package/build/helpers/debugDeep.js.map +0 -1
  123. package/build/helpers/debugShallow.js.map +0 -1
  124. package/build/helpers/findAll.js.map +0 -1
  125. package/build/helpers/matchers/accessibilityState.js.map +0 -1
  126. package/build/helpers/matchers/accessibilityValue.js.map +0 -1
  127. package/build/helpers/matchers/matchArrayProp.js.map +0 -1
  128. package/build/helpers/matchers/matchLabelText.js.map +0 -1
  129. package/build/helpers/matchers/matchObjectProp.js.map +0 -1
  130. package/build/helpers/matchers/matchStringProp.js.map +0 -1
  131. package/build/helpers/matchers/matchTextContent.js.map +0 -1
  132. package/build/helpers/stringValidation.js.map +0 -1
  133. package/build/queries/a11yState.js.map +0 -1
  134. package/build/queries/a11yValue.js.map +0 -1
  135. package/build/queries/displayValue.js.map +0 -1
  136. package/build/queries/hintText.js.map +0 -1
  137. package/build/queries/labelText.js.map +0 -1
  138. package/build/queries/makeQueries.js.map +0 -1
  139. package/build/queries/placeholderText.js.map +0 -1
  140. package/build/queries/testId.js.map +0 -1
  141. package/build/queries/unsafeProps.js.map +0 -1
  142. package/build/queries/unsafeType.js.map +0 -1
  143. package/build/renderHook.js.map +0 -1
  144. package/build/user-event/scroll/scrollTo.js.map +0 -1
  145. package/build/user-event/type/parseKeys.js.map +0 -1
  146. package/build/waitFor.js.map +0 -1
  147. package/build/waitForElementToBeRemoved.js.map +0 -1
  148. /package/build/{fireEvent.d.ts → fire-event.d.ts} +0 -0
  149. /package/build/helpers/{debugDeep.d.ts → debug-deep.d.ts} +0 -0
  150. /package/build/helpers/{debugShallow.d.ts → debug-shallow.d.ts} +0 -0
  151. /package/build/helpers/{findAll.d.ts → find-all.d.ts} +0 -0
  152. /package/build/helpers/matchers/{accessibilityState.d.ts → match-accessibility-state.d.ts} +0 -0
  153. /package/build/helpers/matchers/{accessibilityValue.d.ts → match-accessibility-value.d.ts} +0 -0
  154. /package/build/helpers/matchers/{matchArrayProp.d.ts → match-array-prop.d.ts} +0 -0
  155. /package/build/helpers/matchers/{matchLabelText.d.ts → match-label-text.d.ts} +0 -0
  156. /package/build/helpers/matchers/{matchObjectProp.d.ts → match-object-prop.d.ts} +0 -0
  157. /package/build/helpers/matchers/{matchStringProp.d.ts → match-string-prop.d.ts} +0 -0
  158. /package/build/helpers/matchers/{matchTextContent.d.ts → match-text-content.d.ts} +0 -0
  159. /package/build/helpers/{stringValidation.d.ts → string-validation.d.ts} +0 -0
  160. /package/build/queries/{unsafeProps.d.ts → unsafe-props.d.ts} +0 -0
  161. /package/build/queries/{unsafeType.d.ts → unsafe-type.d.ts} +0 -0
  162. /package/build/{renderHook.d.ts → render-hook.d.ts} +0 -0
  163. /package/build/user-event/scroll/{scrollTo.d.ts → scroll-to.d.ts} +0 -0
  164. /package/build/user-event/type/{parseKeys.d.ts → parse-keys.d.ts} +0 -0
  165. /package/build/{waitFor.d.ts → wait-for.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"extend-expect.d.js","names":[],"sources":["../../src/matchers/extend-expect.d.ts"],"sourcesContent":["import type { StyleProp } from 'react-native';\nimport type { ReactTestInstance } from 'react-test-renderer';\nimport type { TextMatch, TextMatchOptions } from '../matches';\nimport type { Style } from './to-have-style';\n\nexport interface JestNativeMatchers<R> {\n toBeOnTheScreen(): R;\n toBeChecked(): R;\n toBeCollapsed(): R;\n toBeDisabled(): R;\n toBeBusy(): R;\n toBeEmptyElement(): R;\n toBeEnabled(): R;\n toBeExpanded(): R;\n toBePartiallyChecked(): R;\n toBeSelected(): R;\n toBeVisible(): R;\n toContainElement(element: ReactTestInstance | null): R;\n toHaveDisplayValue(expectedValue: TextMatch, options?: TextMatchOptions): R;\n toHaveProp(name: string, expectedValue?: unknown): R;\n toHaveStyle(style: StyleProp<Style>): R;\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.\ndeclare module '@jest/expect' {\n interface Matchers<R extends void | Promise<void>>\n extends JestNativeMatchers<R> {}\n}\n"],"mappings":""}
1
+ {"version":3,"file":"extend-expect.d.js","names":[],"sources":["../../src/matchers/extend-expect.d.ts"],"sourcesContent":["import type { StyleProp } from 'react-native';\nimport type { ReactTestInstance } from 'react-test-renderer';\nimport type { TextMatch, TextMatchOptions } from '../matches';\nimport type { AccessibilityValueMatcher } from '../helpers/matchers/match-accessibility-value';\nimport type { Style } from './to-have-style';\n\nexport interface JestNativeMatchers<R> {\n toBeOnTheScreen(): R;\n toBeChecked(): R;\n toBeCollapsed(): R;\n toBeDisabled(): R;\n toBeBusy(): R;\n toBeEmptyElement(): R;\n toBeEnabled(): R;\n toBeExpanded(): R;\n toBePartiallyChecked(): R;\n toBeSelected(): R;\n toBeVisible(): R;\n toContainElement(element: ReactTestInstance | null): R;\n toHaveAccessibilityValue(expectedValue: AccessibilityValueMatcher): R;\n toHaveAccessibleName(expectedName?: TextMatch, options?: TextMatchOptions): R;\n toHaveDisplayValue(expectedValue: TextMatch, options?: TextMatchOptions): R;\n toHaveProp(name: string, expectedValue?: unknown): R;\n toHaveStyle(style: StyleProp<Style>): R;\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.\ndeclare module '@jest/expect' {\n interface Matchers<R extends void | Promise<void>>\n extends JestNativeMatchers<R> {}\n}\n"],"mappings":""}
@@ -11,6 +11,8 @@ var _toBePartiallyChecked = require("./to-be-partially-checked");
11
11
  var _toBeSelected = require("./to-be-selected");
12
12
  var _toBeVisible = require("./to-be-visible");
13
13
  var _toContainElement = require("./to-contain-element");
14
+ var _toHaveAccessibilityValue = require("./to-have-accessibility-value");
15
+ var _toHaveAccessibleName = require("./to-have-accessible-name");
14
16
  var _toHaveDisplayValue = require("./to-have-display-value");
15
17
  var _toHaveProp = require("./to-have-prop");
16
18
  var _toHaveStyle = require("./to-have-style");
@@ -30,6 +32,8 @@ expect.extend({
30
32
  toBeSelected: _toBeSelected.toBeSelected,
31
33
  toBeVisible: _toBeVisible.toBeVisible,
32
34
  toContainElement: _toContainElement.toContainElement,
35
+ toHaveAccessibilityValue: _toHaveAccessibilityValue.toHaveAccessibilityValue,
36
+ toHaveAccessibleName: _toHaveAccessibleName.toHaveAccessibleName,
33
37
  toHaveDisplayValue: _toHaveDisplayValue.toHaveDisplayValue,
34
38
  toHaveProp: _toHaveProp.toHaveProp,
35
39
  toHaveStyle: _toHaveStyle.toHaveStyle,
@@ -1 +1 @@
1
- {"version":3,"file":"extend-expect.js","names":["_toBeOnTheScreen","require","_toBeChecked","_toBeCollapsed","_toBeDisabled","_toBeBusy","_toBeEmptyElement","_toBeExpanded","_toBePartiallyChecked","_toBeSelected","_toBeVisible","_toContainElement","_toHaveDisplayValue","_toHaveProp","_toHaveStyle","_toHaveTextContent","expect","extend","toBeOnTheScreen","toBeChecked","toBeCollapsed","toBeDisabled","toBeBusy","toBeEmptyElement","toBeEnabled","toBeExpanded","toBePartiallyChecked","toBeSelected","toBeVisible","toContainElement","toHaveDisplayValue","toHaveProp","toHaveStyle","toHaveTextContent"],"sources":["../../src/matchers/extend-expect.ts"],"sourcesContent":["/// <reference path=\"./extend-expect.d.ts\" />\n\nimport { toBeOnTheScreen } from './to-be-on-the-screen';\nimport { toBeChecked } from './to-be-checked';\nimport { toBeCollapsed } from './to-be-collapsed';\nimport { toBeDisabled, toBeEnabled } from './to-be-disabled';\nimport { toBeBusy } from './to-be-busy';\nimport { toBeEmptyElement } from './to-be-empty-element';\nimport { toBeExpanded } from './to-be-expanded';\nimport { toBePartiallyChecked } from './to-be-partially-checked';\nimport { toBeSelected } from './to-be-selected';\nimport { toBeVisible } from './to-be-visible';\nimport { toContainElement } from './to-contain-element';\nimport { toHaveDisplayValue } from './to-have-display-value';\nimport { toHaveProp } from './to-have-prop';\nimport { toHaveStyle } from './to-have-style';\nimport { toHaveTextContent } from './to-have-text-content';\n\nexpect.extend({\n toBeOnTheScreen,\n toBeChecked,\n toBeCollapsed,\n toBeDisabled,\n toBeBusy,\n toBeEmptyElement,\n toBeEnabled,\n toBeExpanded,\n toBePartiallyChecked,\n toBeSelected,\n toBeVisible,\n toContainElement,\n toHaveDisplayValue,\n toHaveProp,\n toHaveStyle,\n toHaveTextContent,\n});\n"],"mappings":";;AAEA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AACA,IAAAW,mBAAA,GAAAX,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,YAAA,GAAAb,OAAA;AACA,IAAAc,kBAAA,GAAAd,OAAA;AAhBA;;AAkBAe,MAAM,CAACC,MAAM,CAAC;EACZC,eAAe,EAAfA,gCAAe;EACfC,WAAW,EAAXA,wBAAW;EACXC,aAAa,EAAbA,4BAAa;EACbC,YAAY,EAAZA,0BAAY;EACZC,QAAQ,EAARA,kBAAQ;EACRC,gBAAgB,EAAhBA,kCAAgB;EAChBC,WAAW,EAAXA,yBAAW;EACXC,YAAY,EAAZA,0BAAY;EACZC,oBAAoB,EAApBA,0CAAoB;EACpBC,YAAY,EAAZA,0BAAY;EACZC,WAAW,EAAXA,wBAAW;EACXC,gBAAgB,EAAhBA,kCAAgB;EAChBC,kBAAkB,EAAlBA,sCAAkB;EAClBC,UAAU,EAAVA,sBAAU;EACVC,WAAW,EAAXA,wBAAW;EACXC,iBAAiB,EAAjBA;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"extend-expect.js","names":["_toBeOnTheScreen","require","_toBeChecked","_toBeCollapsed","_toBeDisabled","_toBeBusy","_toBeEmptyElement","_toBeExpanded","_toBePartiallyChecked","_toBeSelected","_toBeVisible","_toContainElement","_toHaveAccessibilityValue","_toHaveAccessibleName","_toHaveDisplayValue","_toHaveProp","_toHaveStyle","_toHaveTextContent","expect","extend","toBeOnTheScreen","toBeChecked","toBeCollapsed","toBeDisabled","toBeBusy","toBeEmptyElement","toBeEnabled","toBeExpanded","toBePartiallyChecked","toBeSelected","toBeVisible","toContainElement","toHaveAccessibilityValue","toHaveAccessibleName","toHaveDisplayValue","toHaveProp","toHaveStyle","toHaveTextContent"],"sources":["../../src/matchers/extend-expect.ts"],"sourcesContent":["/// <reference path=\"./extend-expect.d.ts\" />\n\nimport { toBeOnTheScreen } from './to-be-on-the-screen';\nimport { toBeChecked } from './to-be-checked';\nimport { toBeCollapsed } from './to-be-collapsed';\nimport { toBeDisabled, toBeEnabled } from './to-be-disabled';\nimport { toBeBusy } from './to-be-busy';\nimport { toBeEmptyElement } from './to-be-empty-element';\nimport { toBeExpanded } from './to-be-expanded';\nimport { toBePartiallyChecked } from './to-be-partially-checked';\nimport { toBeSelected } from './to-be-selected';\nimport { toBeVisible } from './to-be-visible';\nimport { toContainElement } from './to-contain-element';\nimport { toHaveAccessibilityValue } from './to-have-accessibility-value';\nimport { toHaveAccessibleName } from './to-have-accessible-name';\nimport { toHaveDisplayValue } from './to-have-display-value';\nimport { toHaveProp } from './to-have-prop';\nimport { toHaveStyle } from './to-have-style';\nimport { toHaveTextContent } from './to-have-text-content';\n\nexpect.extend({\n toBeOnTheScreen,\n toBeChecked,\n toBeCollapsed,\n toBeDisabled,\n toBeBusy,\n toBeEmptyElement,\n toBeEnabled,\n toBeExpanded,\n toBePartiallyChecked,\n toBeSelected,\n toBeVisible,\n toContainElement,\n toHaveAccessibilityValue,\n toHaveAccessibleName,\n toHaveDisplayValue,\n toHaveProp,\n toHaveStyle,\n toHaveTextContent,\n});\n"],"mappings":";;AAEA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AACA,IAAAW,yBAAA,GAAAX,OAAA;AACA,IAAAY,qBAAA,GAAAZ,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AACA,IAAAe,YAAA,GAAAf,OAAA;AACA,IAAAgB,kBAAA,GAAAhB,OAAA;AAlBA;;AAoBAiB,MAAM,CAACC,MAAM,CAAC;EACZC,eAAe,EAAfA,gCAAe;EACfC,WAAW,EAAXA,wBAAW;EACXC,aAAa,EAAbA,4BAAa;EACbC,YAAY,EAAZA,0BAAY;EACZC,QAAQ,EAARA,kBAAQ;EACRC,gBAAgB,EAAhBA,kCAAgB;EAChBC,WAAW,EAAXA,yBAAW;EACXC,YAAY,EAAZA,0BAAY;EACZC,oBAAoB,EAApBA,0CAAoB;EACpBC,YAAY,EAAZA,0BAAY;EACZC,WAAW,EAAXA,wBAAW;EACXC,gBAAgB,EAAhBA,kCAAgB;EAChBC,wBAAwB,EAAxBA,kDAAwB;EACxBC,oBAAoB,EAApBA,0CAAoB;EACpBC,kBAAkB,EAAlBA,sCAAkB;EAClBC,UAAU,EAAVA,sBAAU;EACVC,WAAW,EAAXA,wBAAW;EACXC,iBAAiB,EAAjBA;AACF,CAAC,CAAC"}
@@ -9,6 +9,8 @@ export { toBePartiallyChecked } from './to-be-partially-checked';
9
9
  export { toBeSelected } from './to-be-selected';
10
10
  export { toBeVisible } from './to-be-visible';
11
11
  export { toContainElement } from './to-contain-element';
12
+ export { toHaveAccessibilityValue } from './to-have-accessibility-value';
13
+ export { toHaveAccessibleName } from './to-have-accessible-name';
12
14
  export { toHaveDisplayValue } from './to-have-display-value';
13
15
  export { toHaveProp } from './to-have-prop';
14
16
  export { toHaveStyle } from './to-have-style';
@@ -75,6 +75,18 @@ Object.defineProperty(exports, "toContainElement", {
75
75
  return _toContainElement.toContainElement;
76
76
  }
77
77
  });
78
+ Object.defineProperty(exports, "toHaveAccessibilityValue", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _toHaveAccessibilityValue.toHaveAccessibilityValue;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "toHaveAccessibleName", {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _toHaveAccessibleName.toHaveAccessibleName;
88
+ }
89
+ });
78
90
  Object.defineProperty(exports, "toHaveDisplayValue", {
79
91
  enumerable: true,
80
92
  get: function () {
@@ -110,6 +122,8 @@ var _toBePartiallyChecked = require("./to-be-partially-checked");
110
122
  var _toBeSelected = require("./to-be-selected");
111
123
  var _toBeVisible = require("./to-be-visible");
112
124
  var _toContainElement = require("./to-contain-element");
125
+ var _toHaveAccessibilityValue = require("./to-have-accessibility-value");
126
+ var _toHaveAccessibleName = require("./to-have-accessible-name");
113
127
  var _toHaveDisplayValue = require("./to-have-display-value");
114
128
  var _toHaveProp = require("./to-have-prop");
115
129
  var _toHaveStyle = require("./to-have-style");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_toBeBusy","require","_toBeChecked","_toBeCollapsed","_toBeDisabled","_toBeEmptyElement","_toBeExpanded","_toBeOnTheScreen","_toBePartiallyChecked","_toBeSelected","_toBeVisible","_toContainElement","_toHaveDisplayValue","_toHaveProp","_toHaveStyle","_toHaveTextContent"],"sources":["../../src/matchers/index.tsx"],"sourcesContent":["export { toBeBusy } from './to-be-busy';\nexport { toBeChecked } from './to-be-checked';\nexport { toBeCollapsed } from './to-be-collapsed';\nexport { toBeDisabled, toBeEnabled } from './to-be-disabled';\nexport { toBeEmptyElement } from './to-be-empty-element';\nexport { toBeExpanded } from './to-be-expanded';\nexport { toBeOnTheScreen } from './to-be-on-the-screen';\nexport { toBePartiallyChecked } from './to-be-partially-checked';\nexport { toBeSelected } from './to-be-selected';\nexport { toBeVisible } from './to-be-visible';\nexport { toContainElement } from './to-contain-element';\nexport { toHaveDisplayValue } from './to-have-display-value';\nexport { toHaveProp } from './to-have-prop';\nexport { toHaveStyle } from './to-have-style';\nexport { toHaveTextContent } from './to-have-text-content';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AACA,IAAAW,mBAAA,GAAAX,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,YAAA,GAAAb,OAAA;AACA,IAAAc,kBAAA,GAAAd,OAAA"}
1
+ {"version":3,"file":"index.js","names":["_toBeBusy","require","_toBeChecked","_toBeCollapsed","_toBeDisabled","_toBeEmptyElement","_toBeExpanded","_toBeOnTheScreen","_toBePartiallyChecked","_toBeSelected","_toBeVisible","_toContainElement","_toHaveAccessibilityValue","_toHaveAccessibleName","_toHaveDisplayValue","_toHaveProp","_toHaveStyle","_toHaveTextContent"],"sources":["../../src/matchers/index.ts"],"sourcesContent":["export { toBeBusy } from './to-be-busy';\nexport { toBeChecked } from './to-be-checked';\nexport { toBeCollapsed } from './to-be-collapsed';\nexport { toBeDisabled, toBeEnabled } from './to-be-disabled';\nexport { toBeEmptyElement } from './to-be-empty-element';\nexport { toBeExpanded } from './to-be-expanded';\nexport { toBeOnTheScreen } from './to-be-on-the-screen';\nexport { toBePartiallyChecked } from './to-be-partially-checked';\nexport { toBeSelected } from './to-be-selected';\nexport { toBeVisible } from './to-be-visible';\nexport { toContainElement } from './to-contain-element';\nexport { toHaveAccessibilityValue } from './to-have-accessibility-value';\nexport { toHaveAccessibleName } from './to-have-accessible-name';\nexport { toHaveDisplayValue } from './to-have-display-value';\nexport { toHaveProp } from './to-have-prop';\nexport { toHaveStyle } from './to-have-style';\nexport { toHaveTextContent } from './to-have-text-content';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AACA,IAAAW,yBAAA,GAAAX,OAAA;AACA,IAAAY,qBAAA,GAAAZ,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AACA,IAAAe,YAAA,GAAAf,OAAA;AACA,IAAAgB,kBAAA,GAAAhB,OAAA"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="jest" />
2
+ import type { ReactTestInstance } from 'react-test-renderer';
3
+ import { AccessibilityValueMatcher } from '../helpers/matchers/match-accessibility-value';
4
+ export declare function toHaveAccessibilityValue(this: jest.MatcherContext, element: ReactTestInstance, expectedValue: AccessibilityValueMatcher): {
5
+ pass: boolean;
6
+ message: () => string;
7
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toHaveAccessibilityValue = toHaveAccessibilityValue;
7
+ var _jestMatcherUtils = require("jest-matcher-utils");
8
+ var _accessiblity = require("../helpers/accessiblity");
9
+ var _matchAccessibilityValue = require("../helpers/matchers/match-accessibility-value");
10
+ var _object = require("../helpers/object");
11
+ var _utils = require("./utils");
12
+ function toHaveAccessibilityValue(element, expectedValue) {
13
+ (0, _utils.checkHostElement)(element, toHaveAccessibilityValue, this);
14
+ const receivedValue = (0, _accessiblity.getAccessibilityValue)(element);
15
+ return {
16
+ pass: (0, _matchAccessibilityValue.matchAccessibilityValue)(element, expectedValue),
17
+ message: () => {
18
+ const matcher = (0, _jestMatcherUtils.matcherHint)(`${this.isNot ? '.not' : ''}.toHaveAccessibilityValue`, 'element', (0, _jestMatcherUtils.stringify)(expectedValue));
19
+ return (0, _utils.formatMessage)(matcher, `Expected the element ${this.isNot ? 'not to' : 'to'} have accessibility value`, (0, _jestMatcherUtils.stringify)(expectedValue), 'Received element with accessibility value', (0, _jestMatcherUtils.stringify)((0, _object.removeUndefinedKeys)(receivedValue)));
20
+ }
21
+ };
22
+ }
23
+ //# sourceMappingURL=to-have-accessibility-value.js.map
@@ -0,0 +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 ${\n this.isNot ? 'not to' : 'to'\n } 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,wBACC,IAAI,CAACE,KAAK,GAAG,QAAQ,GAAG,IACzB,2BAA0B,EAC3B,IAAAC,2BAAS,EAACV,aAAa,CAAC,EACxB,2CAA2C,EAC3C,IAAAU,2BAAS,EAAC,IAAAE,2BAAmB,EAACV,aAAa,CAAC,CAC9C,CAAC;IACH;EACF,CAAC;AACH"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="jest" />
2
+ import type { ReactTestInstance } from 'react-test-renderer';
3
+ import { TextMatch, TextMatchOptions } from '../matches';
4
+ export declare function toHaveAccessibleName(this: jest.MatcherContext, element: ReactTestInstance, expectedName?: TextMatch, options?: TextMatchOptions): {
5
+ pass: boolean;
6
+ message: () => string;
7
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toHaveAccessibleName = toHaveAccessibleName;
7
+ var _jestMatcherUtils = require("jest-matcher-utils");
8
+ var _accessiblity = require("../helpers/accessiblity");
9
+ var _matches = require("../matches");
10
+ var _utils = require("./utils");
11
+ function toHaveAccessibleName(element, expectedName, options) {
12
+ (0, _utils.checkHostElement)(element, toHaveAccessibleName, this);
13
+ const receivedName = (0, _accessiblity.getAccessibleName)(element);
14
+ const missingExpectedValue = arguments.length === 1;
15
+ let pass = false;
16
+ if (missingExpectedValue) {
17
+ pass = receivedName !== '';
18
+ } else {
19
+ pass = expectedName != null ? (0, _matches.matches)(expectedName, receivedName, options?.normalizer, options?.exact) : false;
20
+ }
21
+ return {
22
+ pass,
23
+ message: () => {
24
+ return [(0, _utils.formatMessage)((0, _jestMatcherUtils.matcherHint)(`${this.isNot ? '.not' : ''}.toHaveAccessibleName`, 'element', ''), `Expected element ${this.isNot ? 'not to' : 'to'} have accessible name`, expectedName, 'Received', receivedName)].join('\n');
25
+ }
26
+ };
27
+ }
28
+ //# sourceMappingURL=to-have-accessible-name.js.map
@@ -0,0 +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(\n expectedName,\n receivedName,\n options?.normalizer,\n options?.exact\n )\n : false;\n }\n\n return {\n pass,\n message: () => {\n return [\n formatMessage(\n matcherHint(\n `${this.isNot ? '.not' : ''}.toHaveAccessibleName`,\n 'element',\n ''\n ),\n `Expected element ${\n this.isNot ? 'not to' : 'to'\n } 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,EACLT,YAAY,EACZG,YAAY,EACZF,OAAO,EAAES,UAAU,EACnBT,OAAO,EAAEU,KACX,CAAC,GACD,KAAK;EACb;EAEA,OAAO;IACLH,IAAI;IACJI,OAAO,EAAEA,CAAA,KAAM;MACb,OAAO,CACL,IAAAC,oBAAa,EACX,IAAAC,6BAAW,EACR,GAAE,IAAI,CAACC,KAAK,GAAG,MAAM,GAAG,EAAG,uBAAsB,EAClD,SAAS,EACT,EACF,CAAC,EACA,oBACC,IAAI,CAACA,KAAK,GAAG,QAAQ,GAAG,IACzB,uBAAsB,EACvBf,YAAY,EACZ,UAAU,EACVG,YACF,CAAC,CACF,CAACa,IAAI,CAAC,IAAI,CAAC;IACd;EACF,CAAC;AACH"}
@@ -15,4 +15,4 @@ export declare function checkHostElement(element: ReactTestInstance | null | und
15
15
  */
16
16
  export declare function formatElement(element: ReactTestInstance | null): string;
17
17
  export declare function formatElementArray(elements: ReactTestInstance[]): string;
18
- export declare function formatMessage(matcher: string, expectedLabel: string, expectedValue: string | RegExp, receivedLabel: string, receivedValue: string | null | undefined): string;
18
+ export declare function formatMessage(matcher: string, expectedLabel: string, expectedValue: string | RegExp | null | undefined, receivedLabel: string, receivedValue: string | null | undefined): string;
@@ -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(\n received: unknown,\n matcherFn: jest.CustomMatcher,\n context: jest.MatcherContext\n ) {\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(\n `${context.isNot ? '.not' : ''}.${matcherFn.name}`,\n 'received',\n ''\n ),\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 =\n 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,\n receivedLabel: string,\n receivedValue: string | null | undefined\n) {\n return [\n `${matcher}\\n`,\n `${expectedLabel}:\\n${EXPECTED_COLOR(\n redent(formatValue(expectedValue), 2)\n )}`,\n `${receivedLabel}:\\n${RECEIVED_COLOR(\n redent(formatValue(receivedValue), 2)\n )}`,\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,GAAAC,MAAA,CAAAE,wBAAA,CAAAX,CAAA,EAAAY,CAAA,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WAAW,CAACJ,aAAa,CAAC,EAAE,CAAC,CACtC,CAAE,EAAC,EACF,GAAEC,aAAc,MAAK,IAAA/B,gCAAc,EAClC,IAAAU,eAAM,EAACwB,WAAW,CAACF,aAAa,CAAC,EAAE,CAAC,CACtC,CAAE,EAAC,CACJ,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","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(\n received: unknown,\n matcherFn: jest.CustomMatcher,\n context: jest.MatcherContext\n ) {\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(\n `${context.isNot ? '.not' : ''}.${matcherFn.name}`,\n 'received',\n ''\n ),\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 =\n 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(\n redent(formatValue(expectedValue), 2)\n )}`,\n `${receivedLabel}:\\n${RECEIVED_COLOR(\n redent(formatValue(receivedValue), 2)\n )}`,\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,GAAAC,MAAA,CAAAE,wB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c,EAClC,IAAAvB,eAAM,EAACwB,WAAW,CAACJ,aAAa,CAAC,EAAE,CAAC,CACtC,CAAE,EAAC,EACF,GAAEC,aAAc,MAAK,IAAA/B,gCAAc,EAClC,IAAAU,eAAM,EAACwB,WAAW,CAACF,aAAa,CAAC,EAAE,CAAC,CACtC,CAAE,EAAC,CACJ,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"}
package/build/pure.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  export { default as act } from './act';
2
2
  export { default as cleanup } from './cleanup';
3
- export { default as fireEvent } from './fireEvent';
3
+ export { default as fireEvent } from './fire-event';
4
4
  export { default as render } from './render';
5
- export { default as waitFor } from './waitFor';
6
- export { default as waitForElementToBeRemoved } from './waitForElementToBeRemoved';
5
+ export { default as waitFor } from './wait-for';
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
9
  export { isHiddenFromAccessibility, isInaccessible, } from './helpers/accessiblity';
10
10
  export { getDefaultNormalizer } from './matches';
11
- export { renderHook } from './renderHook';
11
+ export { renderHook } from './render-hook';
12
12
  export { screen } from './screen';
13
13
  export { userEvent } from './user-event';
14
14
  export type { RenderOptions, RenderResult, RenderResult as RenderAPI, DebugFunction, } from './render';
15
- export type { RenderHookOptions, RenderHookResult } from './renderHook';
15
+ export type { RenderHookOptions, RenderHookResult } from './render-hook';
16
16
  export type { Config } from './config';
17
17
  export type { UserEventConfig } from './user-event';
package/build/pure.js CHANGED
@@ -101,15 +101,15 @@ Object.defineProperty(exports, "within", {
101
101
  });
102
102
  var _act = _interopRequireDefault(require("./act"));
103
103
  var _cleanup = _interopRequireDefault(require("./cleanup"));
104
- var _fireEvent = _interopRequireDefault(require("./fireEvent"));
104
+ var _fireEvent = _interopRequireDefault(require("./fire-event"));
105
105
  var _render = _interopRequireDefault(require("./render"));
106
- var _waitFor = _interopRequireDefault(require("./waitFor"));
107
- var _waitForElementToBeRemoved = _interopRequireDefault(require("./waitForElementToBeRemoved"));
106
+ var _waitFor = _interopRequireDefault(require("./wait-for"));
107
+ var _waitForElementToBeRemoved = _interopRequireDefault(require("./wait-for-element-to-be-removed"));
108
108
  var _within = require("./within");
109
109
  var _config = require("./config");
110
110
  var _accessiblity = require("./helpers/accessiblity");
111
111
  var _matches = require("./matches");
112
- var _renderHook = require("./renderHook");
112
+ var _renderHook = require("./render-hook");
113
113
  var _screen = require("./screen");
114
114
  var _userEvent = require("./user-event");
115
115
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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 './fireEvent';\nexport { default as render } from './render';\nexport { default as waitFor } from './waitFor';\nexport { default as waitForElementToBeRemoved } from './waitForElementToBeRemoved';\nexport { within, getQueriesForElement } from './within';\n\nexport { configure, resetToDefaults } from './config';\nexport {\n isHiddenFromAccessibility,\n isInaccessible,\n} from './helpers/accessiblity';\nexport { getDefaultNormalizer } from './matches';\nexport { renderHook } from './renderHook';\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 './renderHook';\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;AAIA,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","_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 {\n isHiddenFromAccessibility,\n isInaccessible,\n} 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;AAIA,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,6 +1,6 @@
1
1
  import type { ReactTestInstance } from 'react-test-renderer';
2
- import { AccessibilityStateMatcher } from '../helpers/matchers/accessibilityState';
3
- import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './makeQueries';
2
+ import { AccessibilityStateMatcher } from '../helpers/matchers/match-accessibility-state';
3
+ import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './make-queries';
4
4
  import { CommonQueryOptions } from './options';
5
5
  export type ByA11yStateQueries = {
6
6
  getByA11yState: GetByQuery<AccessibilityStateMatcher, CommonQueryOptions>;
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.bindByA11yStateQueries = void 0;
7
7
  var _accessiblity = require("../helpers/accessiblity");
8
8
  var _deprecation = require("../helpers/deprecation");
9
- var _findAll = require("../helpers/findAll");
10
- var _accessibilityState = require("../helpers/matchers/accessibilityState");
11
- var _makeQueries = require("./makeQueries");
9
+ var _findAll = require("../helpers/find-all");
10
+ var _matchAccessibilityState = require("../helpers/matchers/match-accessibility-state");
11
+ var _makeQueries = require("./make-queries");
12
12
  const queryAllByA11yState = instance => function queryAllByA11yStateFn(matcher, queryOptions) {
13
- return (0, _findAll.findAll)(instance, node => (0, _accessibilityState.matchAccessibilityState)(node, matcher), queryOptions);
13
+ return (0, _findAll.findAll)(instance, node => (0, _matchAccessibilityState.matchAccessibilityState)(node, matcher), queryOptions);
14
14
  };
15
15
  const buildErrorMessage = (state = {}) => {
16
16
  const errors = [];
@@ -56,4 +56,4 @@ const bindByA11yStateQueries = instance => {
56
56
  };
57
57
  };
58
58
  exports.bindByA11yStateQueries = bindByA11yStateQueries;
59
- //# sourceMappingURL=a11yState.js.map
59
+ //# sourceMappingURL=accessibility-state.js.map
@@ -0,0 +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(\n instance,\n (node) => matchAccessibilityState(node, matcher),\n queryOptions\n );\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<\n AccessibilityStateMatcher,\n CommonQueryOptions\n >;\n queryByA11yState: QueryByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n queryAllByA11yState: QueryAllByQuery<\n AccessibilityStateMatcher,\n CommonQueryOptions\n >;\n findByA11yState: FindByQuery<AccessibilityStateMatcher, CommonQueryOptions>;\n findAllByA11yState: FindAllByQuery<\n AccessibilityStateMatcher,\n CommonQueryOptions\n >;\n\n getByAccessibilityState: GetByQuery<\n AccessibilityStateMatcher,\n CommonQueryOptions\n >;\n getAllByAccessibilityState: GetAllByQuery<\n AccessibilityStateMatcher,\n CommonQueryOptions\n >;\n queryByAccessibilityState: QueryByQuery<\n AccessibilityStateMatcher,\n CommonQueryOptions\n >;\n queryAllByAccessibilityState: QueryAllByQuery<\n AccessibilityStateMatcher,\n CommonQueryOptions\n >;\n findByAccessibilityState: FindByQuery<\n AccessibilityStateMatcher,\n CommonQueryOptions\n >;\n findAllByAccessibilityState: FindAllByQuery<\n AccessibilityStateMatcher,\n CommonQueryOptions\n >;\n};\n\nexport const bindByA11yStateQueries = (\n instance: ReactTestInstance\n): 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 expect(...).toHaveAccessibilityState(...) matcher from \"@testing-library/jest-native\" package 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,OAAO,EAAEC,YAAY,EAAE;EACpD,OAAO,IAAA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AO;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,gMACF;EACF,CAAC;AACH,CAAC;AAACQ,OAAA,CAAAb,sBAAA,GAAAA,sBAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { ReactTestInstance } from 'react-test-renderer';
2
- import { AccessibilityValueMatcher } from '../helpers/matchers/accessibilityValue';
3
- import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './makeQueries';
2
+ import { AccessibilityValueMatcher } from '../helpers/matchers/match-accessibility-value';
3
+ import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './make-queries';
4
4
  import { CommonQueryOptions } from './options';
5
5
  export type ByA11yValueQueries = {
6
6
  getByA11yValue: GetByQuery<AccessibilityValueMatcher, CommonQueryOptions>;
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.bindByA11yValueQueries = void 0;
7
7
  var _accessiblity = require("../helpers/accessiblity");
8
8
  var _deprecation = require("../helpers/deprecation");
9
- var _findAll = require("../helpers/findAll");
10
- var _accessibilityValue = require("../helpers/matchers/accessibilityValue");
11
- var _makeQueries = require("./makeQueries");
9
+ var _findAll = require("../helpers/find-all");
10
+ var _matchAccessibilityValue = require("../helpers/matchers/match-accessibility-value");
11
+ var _makeQueries = require("./make-queries");
12
12
  const queryAllByA11yValue = instance => function queryAllByA11yValueFn(value, queryOptions) {
13
- return (0, _findAll.findAll)(instance, node => (0, _accessibilityValue.matchAccessibilityValue)(node, value), queryOptions);
13
+ return (0, _findAll.findAll)(instance, node => (0, _matchAccessibilityValue.matchAccessibilityValue)(node, value), queryOptions);
14
14
  };
15
15
  const formatQueryParams = matcher => {
16
16
  const params = [];
@@ -56,4 +56,4 @@ const bindByA11yValueQueries = instance => {
56
56
  };
57
57
  };
58
58
  exports.bindByA11yValueQueries = bindByA11yValueQueries;
59
- //# sourceMappingURL=a11yValue.js.map
59
+ //# sourceMappingURL=accessibility-value.js.map
@@ -0,0 +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(\n instance,\n (node) => matchAccessibilityValue(node, value),\n queryOptions\n );\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<\n AccessibilityValueMatcher,\n CommonQueryOptions\n >;\n queryByA11yValue: QueryByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n queryAllByA11yValue: QueryAllByQuery<\n AccessibilityValueMatcher,\n CommonQueryOptions\n >;\n findByA11yValue: FindByQuery<AccessibilityValueMatcher, CommonQueryOptions>;\n findAllByA11yValue: FindAllByQuery<\n AccessibilityValueMatcher,\n CommonQueryOptions\n >;\n\n getByAccessibilityValue: GetByQuery<\n AccessibilityValueMatcher,\n CommonQueryOptions\n >;\n getAllByAccessibilityValue: GetAllByQuery<\n AccessibilityValueMatcher,\n CommonQueryOptions\n >;\n queryByAccessibilityValue: QueryByQuery<\n AccessibilityValueMatcher,\n CommonQueryOptions\n >;\n queryAllByAccessibilityValue: QueryAllByQuery<\n AccessibilityValueMatcher,\n CommonQueryOptions\n >;\n findByAccessibilityValue: FindByQuery<\n AccessibilityValueMatcher,\n CommonQueryOptions\n >;\n findAllByAccessibilityValue: FindAllByQuery<\n AccessibilityValueMatcher,\n CommonQueryOptions\n >;\n};\n\nexport const bindByA11yValueQueries = (\n instance: ReactTestInstance\n): 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 expect(...).toHaveAccessibilityValue(...) matcher from \"@testing-library/jest-native\" package 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,EACZJ,QAAQ,EACPK,IAAI,IAAK,IAAAC,gDAAuB,EAACD,IAAI,EAAEH,KAAK,CAAC,EAC9CC,YACF,CAAC;AACH,CAAC;AAEH,MAAMI,iBAAiB,GAAIC,OAAkC,IAAK;EAChE,MAAMC,MAAgB,GAAG,EAAE;EAE3BC,mCAAqB,CAACC,OAAO,CAAEC,QAAQ,IAAK;IAC1C,IAAIJ,OAAO,CAACI,QAAQ,CAAC,KAAKC,SAAS,EAAE;MACnCJ,MAAM,CAACK,IAAI,CAAE,GAAEF,QAAS,WAAUJ,OAAO,CAACI,QAAQ,CAAE,EAAC,CAAC;IACxD;E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ReactTestInstance } from 'react-test-renderer';
2
2
  import { TextMatch, TextMatchOptions } from '../matches';
3
- import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './makeQueries';
3
+ import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './make-queries';
4
4
  import type { CommonQueryOptions } from './options';
5
5
  type ByDisplayValueOptions = CommonQueryOptions & TextMatchOptions;
6
6
  export type ByDisplayValueQueries = {
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.bindByDisplayValueQueries = void 0;
7
- var _findAll = require("../helpers/findAll");
7
+ var _findAll = require("../helpers/find-all");
8
8
  var _hostComponentNames = require("../helpers/host-component-names");
9
9
  var _textInput = require("../helpers/text-input");
10
10
  var _matches = require("../matches");
11
- var _makeQueries = require("./makeQueries");
11
+ var _makeQueries = require("./make-queries");
12
12
  const matchDisplayValue = (node, expectedValue, options = {}) => {
13
13
  const {
14
14
  exact,
@@ -39,4 +39,4 @@ const bindByDisplayValueQueries = instance => ({
39
39
  findAllByDisplayValue: findAllBy(instance)
40
40
  });
41
41
  exports.bindByDisplayValueQueries = bindByDisplayValueQueries;
42
- //# sourceMappingURL=displayValue.js.map
42
+ //# sourceMappingURL=display-value.js.map
@@ -0,0 +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) =>\n isHostTextInput(node) &&\n 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 = (\n instance: ReactTestInstance\n): 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,IACH,IAAAc,mCAAe,EAACd,IAAI,CAAC,IACrBD,iBAAiB,CAACC,IAAI,EAAEW,YAAY,EAAEC,YAAY,CAAC,EACrDA,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,GACpChB,QAA2B,KACA;EAC3BiB,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,6 +1,6 @@
1
1
  import type { ReactTestInstance } from 'react-test-renderer';
2
2
  import { TextMatch, TextMatchOptions } from '../matches';
3
- import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './makeQueries';
3
+ import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './make-queries';
4
4
  import { CommonQueryOptions } from './options';
5
5
  type ByHintTextOptions = CommonQueryOptions & TextMatchOptions;
6
6
  export type ByHintTextQueries = {
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.bindByHintTextQueries = void 0;
7
- var _findAll = require("../helpers/findAll");
7
+ var _findAll = require("../helpers/find-all");
8
8
  var _matches = require("../matches");
9
- var _makeQueries = require("./makeQueries");
9
+ var _makeQueries = require("./make-queries");
10
10
  const getNodeByHintText = (node, text, options = {}) => {
11
11
  const {
12
12
  exact,
@@ -58,4 +58,4 @@ const bindByHintTextQueries = instance => {
58
58
  };
59
59
  };
60
60
  exports.bindByHintTextQueries = bindByHintTextQueries;
61
- //# sourceMappingURL=hintText.js.map
61
+ //# sourceMappingURL=hint-text.js.map
@@ -0,0 +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(\n instance,\n (node) => getNodeByHintText(node, hint, queryOptions),\n queryOptions\n );\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 = (\n instance: ReactTestInstance\n): 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,EACZJ,QAAQ,EACPT,IAAI,IAAKD,iBAAiB,CAACC,IAAI,EAAEW,IAAI,EAAEC,YAAY,CAAC,EACrDA,YACF,CAAC;AACH,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,GAChCf,QAA2B,IACL;EACtB,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,6 +1,6 @@
1
1
  import type { ReactTestInstance } from 'react-test-renderer';
2
2
  import { TextMatch, TextMatchOptions } from '../matches';
3
- import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './makeQueries';
3
+ import type { FindAllByQuery, FindByQuery, GetAllByQuery, GetByQuery, QueryAllByQuery, QueryByQuery } from './make-queries';
4
4
  import { CommonQueryOptions } from './options';
5
5
  type ByLabelTextOptions = CommonQueryOptions & TextMatchOptions;
6
6
  export type ByLabelTextQueries = {
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.bindByLabelTextQueries = void 0;
7
- var _findAll = require("../helpers/findAll");
8
- var _matchLabelText = require("../helpers/matchers/matchLabelText");
9
- var _makeQueries = require("./makeQueries");
7
+ var _findAll = require("../helpers/find-all");
8
+ var _matchLabelText = require("../helpers/matchers/match-label-text");
9
+ var _makeQueries = require("./make-queries");
10
10
  function queryAllByLabelText(instance) {
11
11
  return (text, queryOptions) => {
12
12
  return (0, _findAll.findAll)(instance, node => (0, _matchLabelText.matchLabelText)(instance, node, text, queryOptions), queryOptions);
@@ -31,4 +31,4 @@ const bindByLabelTextQueries = instance => ({
31
31
  findAllByLabelText: findAllBy(instance)
32
32
  });
33
33
  exports.bindByLabelTextQueries = bindByLabelTextQueries;
34
- //# sourceMappingURL=labelText.js.map
34
+ //# sourceMappingURL=label-text.js.map
@@ -0,0 +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 = (\n instance: ReactTestInstance\n): 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,GACjCjB,QAA2B,KACH;EACxBkB,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,5 +1,5 @@
1
1
  import type { ReactTestInstance } from 'react-test-renderer';
2
- import type { WaitForOptions } from '../waitFor';
2
+ import type { WaitForOptions } from '../wait-for';
3
3
  export type GetByQuery<Predicate, Options = void> = (predicate: Predicate, options?: Options) => ReactTestInstance;
4
4
  export type GetAllByQuery<Predicate, Options = void> = (predicate: Predicate, options?: Options) => ReactTestInstance[];
5
5
  export type QueryByQuery<Predicate, Options = void> = (predicate: Predicate, options?: Options) => ReactTestInstance | null;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.makeQueries = makeQueries;
7
7
  var _errors = require("../helpers/errors");
8
- var _waitFor = _interopRequireDefault(require("../waitFor"));
8
+ var _waitFor = _interopRequireDefault(require("../wait-for"));
9
9
  var _format = _interopRequireDefault(require("../helpers/format"));
10
10
  var _screen = require("../screen");
11
11
  var _formatDefault = require("../helpers/format-default");
@@ -140,4 +140,4 @@ function makeQueries(queryAllByQuery, getMissingError, getMultipleError) {
140
140
  findAllBy: findAllByQuery
141
141
  };
142
142
  }
143
- //# sourceMappingURL=makeQueries.js.map
143
+ //# sourceMappingURL=make-queries.js.map