@testing-library/react-native 12.0.0-rc.2 → 12.0.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 (50) hide show
  1. package/build/act.js.map +1 -1
  2. package/build/cleanup.js.map +1 -1
  3. package/build/config.js.map +1 -1
  4. package/build/fireEvent.js.map +1 -1
  5. package/build/flushMicroTasks.js.map +1 -1
  6. package/build/helpers/accessiblity.js.map +1 -1
  7. package/build/helpers/component-tree.js.map +1 -1
  8. package/build/helpers/debugDeep.js.map +1 -1
  9. package/build/helpers/debugShallow.js.map +1 -1
  10. package/build/helpers/deprecation.js.map +1 -1
  11. package/build/helpers/errors.js.map +1 -1
  12. package/build/helpers/filterNodeByType.js.map +1 -1
  13. package/build/helpers/findAll.js.map +1 -1
  14. package/build/helpers/format.js.map +1 -1
  15. package/build/helpers/getTextContent.js.map +1 -1
  16. package/build/helpers/host-component-names.js.map +1 -1
  17. package/build/helpers/matchers/accessibilityState.js.map +1 -1
  18. package/build/helpers/matchers/accessibilityValue.js.map +1 -1
  19. package/build/helpers/matchers/matchArrayProp.js.map +1 -1
  20. package/build/helpers/matchers/matchLabelText.js.map +1 -1
  21. package/build/helpers/matchers/matchObjectProp.js.map +1 -1
  22. package/build/helpers/matchers/matchStringProp.js.map +1 -1
  23. package/build/helpers/matchers/matchTextContent.js.map +1 -1
  24. package/build/helpers/query-name.js.map +1 -1
  25. package/build/helpers/stringValidation.js.map +1 -1
  26. package/build/helpers/timers.js.map +1 -1
  27. package/build/index.js.map +1 -1
  28. package/build/matches.js.map +1 -1
  29. package/build/pure.js.map +1 -1
  30. package/build/queries/a11yState.js.map +1 -1
  31. package/build/queries/a11yValue.js.map +1 -1
  32. package/build/queries/displayValue.js.map +1 -1
  33. package/build/queries/hintText.js.map +1 -1
  34. package/build/queries/labelText.js.map +1 -1
  35. package/build/queries/makeQueries.js.map +1 -1
  36. package/build/queries/placeholderText.js.map +1 -1
  37. package/build/queries/role.js.map +1 -1
  38. package/build/queries/testId.js.map +1 -1
  39. package/build/queries/text.js.map +1 -1
  40. package/build/queries/unsafeProps.js.map +1 -1
  41. package/build/queries/unsafeType.js.map +1 -1
  42. package/build/react-versions.js.map +1 -1
  43. package/build/render.js.map +1 -1
  44. package/build/renderHook.js.map +1 -1
  45. package/build/screen.js.map +1 -1
  46. package/build/shallow.js.map +1 -1
  47. package/build/waitFor.js.map +1 -1
  48. package/build/waitForElementToBeRemoved.js.map +1 -1
  49. package/build/within.js.map +1 -1
  50. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"waitForElementToBeRemoved.js","names":["isRemoved","result","Array","isArray","length","waitForElementToBeRemoved","expectation","options","timeoutError","ErrorWithStack","initialElements","waitFor","error"],"sources":["../src/waitForElementToBeRemoved.ts"],"sourcesContent":["import waitFor from './waitFor';\nimport type { WaitForOptions } from './waitFor';\nimport { ErrorWithStack } from './helpers/errors';\n\nfunction isRemoved<T>(result: T): boolean {\n return !result || (Array.isArray(result) && !result.length);\n}\n\nexport default async function waitForElementToBeRemoved<T>(\n expectation: () => T,\n options?: WaitForOptions\n): Promise<T> {\n // Created here so we get a nice stacktrace\n const timeoutError = new ErrorWithStack(\n 'Timed out in waitForElementToBeRemoved.',\n waitForElementToBeRemoved\n );\n\n // Elements have to be present initally and then removed.\n const initialElements = expectation();\n if (isRemoved(initialElements)) {\n throw new ErrorWithStack(\n 'The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.',\n waitForElementToBeRemoved\n );\n }\n\n return waitFor(() => {\n let result;\n try {\n result = expectation();\n } catch (error) {\n return initialElements;\n }\n\n if (!isRemoved(result)) {\n throw timeoutError;\n }\n\n return initialElements;\n }, options);\n}\n"],"mappings":";;;;;;AAAA;AAEA;AAAkD;AAElD,SAASA,SAAS,CAAIC,MAAS,EAAW;EACxC,OAAO,CAACA,MAAM,IAAKC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,IAAI,CAACA,MAAM,CAACG,MAAO;AAC7D;AAEe,eAAeC,yBAAyB,CACrDC,WAAoB,EACpBC,OAAwB,EACZ;EACZ;EACA,MAAMC,YAAY,GAAG,IAAIC,sBAAc,CACrC,yCAAyC,EACzCJ,yBAAyB,CAC1B;;EAED;EACA,MAAMK,eAAe,GAAGJ,WAAW,EAAE;EACrC,IAAIN,SAAS,CAACU,eAAe,CAAC,EAAE;IAC9B,MAAM,IAAID,sBAAc,CACtB,oKAAoK,EACpKJ,yBAAyB,CAC1B;EACH;EAEA,OAAO,IAAAM,gBAAO,EAAC,MAAM;IACnB,IAAIV,MAAM;IACV,IAAI;MACFA,MAAM,GAAGK,WAAW,EAAE;IACxB,CAAC,CAAC,OAAOM,KAAK,EAAE;MACd,OAAOF,eAAe;IACxB;IAEA,IAAI,CAACV,SAAS,CAACC,MAAM,CAAC,EAAE;MACtB,MAAMO,YAAY;IACpB;IAEA,OAAOE,eAAe;EACxB,CAAC,EAAEH,OAAO,CAAC;AACb"}
1
+ {"version":3,"file":"waitForElementToBeRemoved.js","names":["_waitFor","_interopRequireDefault","require","_errors","obj","__esModule","default","isRemoved","result","Array","isArray","length","waitForElementToBeRemoved","expectation","options","timeoutError","ErrorWithStack","initialElements","waitFor","error"],"sources":["../src/waitForElementToBeRemoved.ts"],"sourcesContent":["import waitFor from './waitFor';\nimport type { WaitForOptions } from './waitFor';\nimport { ErrorWithStack } from './helpers/errors';\n\nfunction isRemoved<T>(result: T): boolean {\n return !result || (Array.isArray(result) && !result.length);\n}\n\nexport default async function waitForElementToBeRemoved<T>(\n expectation: () => T,\n options?: WaitForOptions\n): Promise<T> {\n // Created here so we get a nice stacktrace\n const timeoutError = new ErrorWithStack(\n 'Timed out in waitForElementToBeRemoved.',\n waitForElementToBeRemoved\n );\n\n // Elements have to be present initally and then removed.\n const initialElements = expectation();\n if (isRemoved(initialElements)) {\n throw new ErrorWithStack(\n 'The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.',\n waitForElementToBeRemoved\n );\n }\n\n return waitFor(() => {\n let result;\n try {\n result = expectation();\n } catch (error) {\n return initialElements;\n }\n\n if (!isRemoved(result)) {\n throw timeoutError;\n }\n\n return initialElements;\n }, options);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAAkD,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAElD,SAASG,SAASA,CAAIC,MAAS,EAAW;EACxC,OAAO,CAACA,MAAM,IAAKC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,IAAI,CAACA,MAAM,CAACG,MAAO;AAC7D;AAEe,eAAeC,yBAAyBA,CACrDC,WAAoB,EACpBC,OAAwB,EACZ;EACZ;EACA,MAAMC,YAAY,GAAG,IAAIC,sBAAc,CACrC,yCAAyC,EACzCJ,yBAAyB,CAC1B;;EAED;EACA,MAAMK,eAAe,GAAGJ,WAAW,EAAE;EACrC,IAAIN,SAAS,CAACU,eAAe,CAAC,EAAE;IAC9B,MAAM,IAAID,sBAAc,CACtB,oKAAoK,EACpKJ,yBAAyB,CAC1B;EACH;EAEA,OAAO,IAAAM,gBAAO,EAAC,MAAM;IACnB,IAAIV,MAAM;IACV,IAAI;MACFA,MAAM,GAAGK,WAAW,EAAE;IACxB,CAAC,CAAC,OAAOM,KAAK,EAAE;MACd,OAAOF,eAAe;IACxB;IAEA,IAAI,CAACV,SAAS,CAACC,MAAM,CAAC,EAAE;MACtB,MAAMO,YAAY;IACpB;IAEA,OAAOE,eAAe;EACxB,CAAC,EAAEH,OAAO,CAAC;AACb"}
@@ -1 +1 @@
1
- {"version":3,"file":"within.js","names":["within","instance","bindByTextQueries","bindByTestIdQueries","bindByDisplayValueQueries","bindByPlaceholderTextQueries","bindByLabelTextQueries","bindByHintTextQueries","bindByRoleQueries","bindByA11yStateQueries","bindByA11yValueQueries","bindUnsafeByTypeQueries","bindUnsafeByPropsQueries","getQueriesForElement"],"sources":["../src/within.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { bindByTextQueries } from './queries/text';\nimport { bindByTestIdQueries } from './queries/testId';\nimport { bindByDisplayValueQueries } from './queries/displayValue';\nimport { bindByPlaceholderTextQueries } from './queries/placeholderText';\nimport { bindByLabelTextQueries } from './queries/labelText';\nimport { bindByHintTextQueries } from './queries/hintText';\nimport { bindByRoleQueries } from './queries/role';\nimport { bindByA11yStateQueries } from './queries/a11yState';\nimport { bindByA11yValueQueries } from './queries/a11yValue';\nimport { bindUnsafeByTypeQueries } from './queries/unsafeType';\nimport { bindUnsafeByPropsQueries } from './queries/unsafeProps';\n\nexport function within(instance: ReactTestInstance) {\n return {\n ...bindByTextQueries(instance),\n ...bindByTestIdQueries(instance),\n ...bindByDisplayValueQueries(instance),\n ...bindByPlaceholderTextQueries(instance),\n ...bindByLabelTextQueries(instance),\n ...bindByHintTextQueries(instance),\n ...bindByRoleQueries(instance),\n ...bindByA11yStateQueries(instance),\n ...bindByA11yValueQueries(instance),\n ...bindUnsafeByTypeQueries(instance),\n ...bindUnsafeByPropsQueries(instance),\n };\n}\n\nexport const getQueriesForElement = within;\n"],"mappings":";;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,SAASA,MAAM,CAACC,QAA2B,EAAE;EAClD,OAAO;IACL,GAAG,IAAAC,uBAAiB,EAACD,QAAQ,CAAC;IAC9B,GAAG,IAAAE,2BAAmB,EAACF,QAAQ,CAAC;IAChC,GAAG,IAAAG,uCAAyB,EAACH,QAAQ,CAAC;IACtC,GAAG,IAAAI,6CAA4B,EAACJ,QAAQ,CAAC;IACzC,GAAG,IAAAK,iCAAsB,EAACL,QAAQ,CAAC;IACnC,GAAG,IAAAM,+BAAqB,EAACN,QAAQ,CAAC;IAClC,GAAG,IAAAO,uBAAiB,EAACP,QAAQ,CAAC;IAC9B,GAAG,IAAAQ,iCAAsB,EAACR,QAAQ,CAAC;IACnC,GAAG,IAAAS,iCAAsB,EAACT,QAAQ,CAAC;IACnC,GAAG,IAAAU,mCAAuB,EAACV,QAAQ,CAAC;IACpC,GAAG,IAAAW,qCAAwB,EAACX,QAAQ;EACtC,CAAC;AACH;AAEO,MAAMY,oBAAoB,GAAGb,MAAM;AAAC"}
1
+ {"version":3,"file":"within.js","names":["_text","require","_testId","_displayValue","_placeholderText","_labelText","_hintText","_role","_a11yState","_a11yValue","_unsafeType","_unsafeProps","within","instance","bindByTextQueries","bindByTestIdQueries","bindByDisplayValueQueries","bindByPlaceholderTextQueries","bindByLabelTextQueries","bindByHintTextQueries","bindByRoleQueries","bindByA11yStateQueries","bindByA11yValueQueries","bindUnsafeByTypeQueries","bindUnsafeByPropsQueries","getQueriesForElement","exports"],"sources":["../src/within.ts"],"sourcesContent":["import type { ReactTestInstance } from 'react-test-renderer';\nimport { bindByTextQueries } from './queries/text';\nimport { bindByTestIdQueries } from './queries/testId';\nimport { bindByDisplayValueQueries } from './queries/displayValue';\nimport { bindByPlaceholderTextQueries } from './queries/placeholderText';\nimport { bindByLabelTextQueries } from './queries/labelText';\nimport { bindByHintTextQueries } from './queries/hintText';\nimport { bindByRoleQueries } from './queries/role';\nimport { bindByA11yStateQueries } from './queries/a11yState';\nimport { bindByA11yValueQueries } from './queries/a11yValue';\nimport { bindUnsafeByTypeQueries } from './queries/unsafeType';\nimport { bindUnsafeByPropsQueries } from './queries/unsafeProps';\n\nexport function within(instance: ReactTestInstance) {\n return {\n ...bindByTextQueries(instance),\n ...bindByTestIdQueries(instance),\n ...bindByDisplayValueQueries(instance),\n ...bindByPlaceholderTextQueries(instance),\n ...bindByLabelTextQueries(instance),\n ...bindByHintTextQueries(instance),\n ...bindByRoleQueries(instance),\n ...bindByA11yStateQueries(instance),\n ...bindByA11yValueQueries(instance),\n ...bindUnsafeByTypeQueries(instance),\n ...bindUnsafeByPropsQueries(instance),\n };\n}\n\nexport const getQueriesForElement = within;\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AAEO,SAASW,MAAMA,CAACC,QAA2B,EAAE;EAClD,OAAO;IACL,GAAG,IAAAC,uBAAiB,EAACD,QAAQ,CAAC;IAC9B,GAAG,IAAAE,2BAAmB,EAACF,QAAQ,CAAC;IAChC,GAAG,IAAAG,uCAAyB,EAACH,QAAQ,CAAC;IACtC,GAAG,IAAAI,6CAA4B,EAACJ,QAAQ,CAAC;IACzC,GAAG,IAAAK,iCAAsB,EAACL,QAAQ,CAAC;IACnC,GAAG,IAAAM,+BAAqB,EAACN,QAAQ,CAAC;IAClC,GAAG,IAAAO,uBAAiB,EAACP,QAAQ,CAAC;IAC9B,GAAG,IAAAQ,iCAAsB,EAACR,QAAQ,CAAC;IACnC,GAAG,IAAAS,iCAAsB,EAACT,QAAQ,CAAC;IACnC,GAAG,IAAAU,mCAAuB,EAACV,QAAQ,CAAC;IACpC,GAAG,IAAAW,qCAAwB,EAACX,QAAQ;EACtC,CAAC;AACH;AAEO,MAAMY,oBAAoB,GAAGb,MAAM;AAACc,OAAA,CAAAD,oBAAA,GAAAA,oBAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testing-library/react-native",
3
- "version": "12.0.0-rc.2",
3
+ "version": "12.0.0",
4
4
  "description": "Simple and complete React Native testing utilities that encourage good testing practices.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",