@testing-library/react-native 14.0.0-alpha.3 → 14.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/act.d.ts +2 -2
- package/build/act.js +6 -3
- package/build/act.js.map +1 -1
- package/build/cleanup.d.ts +3 -5
- package/build/cleanup.js +2 -8
- package/build/cleanup.js.map +1 -1
- package/build/fire-event.d.ts +9 -9
- package/build/fire-event.js +21 -16
- package/build/fire-event.js.map +1 -1
- package/build/helpers/host-component-names.d.ts +1 -0
- package/build/helpers/host-component-names.js +2 -1
- package/build/helpers/host-component-names.js.map +1 -1
- package/build/helpers/timers.d.ts +3 -1
- package/build/helpers/timers.js +3 -1
- package/build/helpers/timers.js.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/pure.d.ts +11 -11
- package/build/pure.js +35 -37
- package/build/pure.js.map +1 -1
- package/build/queries/make-queries.js +3 -4
- package/build/queries/make-queries.js.map +1 -1
- package/build/render-hook.d.ts +9 -7
- package/build/render-hook.js +18 -15
- package/build/render-hook.js.map +1 -1
- package/build/render.d.ts +8 -77
- package/build/render.js +23 -40
- package/build/render.js.map +1 -1
- package/build/screen.js +1 -4
- package/build/screen.js.map +1 -1
- package/build/test-utils/version.d.ts +7 -0
- package/build/test-utils/version.js +18 -0
- package/build/test-utils/version.js.map +1 -0
- package/build/tsconfig.release.tsbuildinfo +1 -1
- package/build/types.js +4 -0
- package/build/unsafe-render-sync.d.ts +144 -0
- package/build/{render-async.js → unsafe-render-sync.js} +49 -31
- package/build/unsafe-render-sync.js.map +1 -0
- package/build/user-event/press/press.js +2 -3
- package/build/user-event/press/press.js.map +1 -1
- package/build/user-event/utils/dispatch-event.js +2 -5
- package/build/user-event/utils/dispatch-event.js.map +1 -1
- package/build/user-event/utils/text-range.js +4 -0
- package/build/wait-for-element-to-be-removed.d.ts +1 -1
- package/build/wait-for-element-to-be-removed.js +3 -4
- package/build/wait-for-element-to-be-removed.js.map +1 -1
- package/build/wait-for.d.ts +1 -1
- package/build/wait-for.js +6 -7
- package/build/wait-for.js.map +1 -1
- package/package.json +9 -12
- package/build/index.flow.js +0 -378
- package/build/render-act.d.ts +0 -3
- package/build/render-act.js +0 -29
- package/build/render-act.js.map +0 -1
- package/build/render-async.d.ts +0 -83
- package/build/render-async.js.map +0 -1
- package/typings/index.flow.js +0 -378
package/build/wait-for.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wait-for.js","names":["_act","_interopRequireDefault","require","_config","_flushMicroTasks","_errors","_timers","_wrapAsync","e","__esModule","default","DEFAULT_INTERVAL","waitForInternal","expectation","timeout","getConfig","asyncUtilTimeout","interval","stackTraceError","onTimeout","TypeError","Promise","resolve","reject","lastError","intervalId","finished","promiseStatus","overallTimeoutTimer","usingFakeTimers","jestFakeTimersAreEnabled","checkExpectation","fakeTimeRemaining","error","Error","copyStackTrace","handleTimeout","act","jest","advanceTimersByTime","flushMicroTasks","setTimeout","setInterval","checkRealTimersCallback","onDone","done","clearTimeout","clearInterval","type","result","then","promiseResult","resolvedValue","rejectedValue","String","waitFor","options","ErrorWithStack","optionsWithStackTrace","wrapAsync"],"sources":["../src/wait-for.ts"],"sourcesContent":["/* globals jest */\nimport act from './act';\nimport { getConfig } from './config';\nimport { flushMicroTasks } from './flush-micro-tasks';\nimport { copyStackTrace, ErrorWithStack } from './helpers/errors';\nimport { clearTimeout, jestFakeTimersAreEnabled, setTimeout } from './helpers/timers';\nimport { wrapAsync } from './helpers/wrap-async';\n\nconst DEFAULT_INTERVAL = 50;\n\nexport type WaitForOptions = {\n timeout?: number;\n interval?: number;\n stackTraceError?: ErrorWithStack;\n onTimeout?: (error: Error) => Error;\n};\n\nfunction waitForInternal<T>(\n expectation: () => T,\n {\n timeout = getConfig().asyncUtilTimeout,\n interval = DEFAULT_INTERVAL,\n stackTraceError,\n onTimeout,\n }: WaitForOptions,\n): Promise<T> {\n if (typeof expectation !== 'function') {\n throw new TypeError('Received `expectation` arg must be a function');\n }\n\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n let lastError: unknown, intervalId: ReturnType<typeof setTimeout>;\n let finished = false;\n let promiseStatus = 'idle';\n\n let overallTimeoutTimer: NodeJS.Timeout | null = null;\n\n const usingFakeTimers = jestFakeTimersAreEnabled();\n\n if (usingFakeTimers) {\n checkExpectation();\n // this is a dangerous rule to disable because it could lead to an\n // infinite loop. However, eslint isn't smart enough to know that we're\n // setting finished inside `onDone` which will be called when we're done\n // waiting or when we've timed out.\n let fakeTimeRemaining = timeout;\n while (!finished) {\n if (!jestFakeTimersAreEnabled()) {\n const error = new Error(\n `Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830`,\n );\n if (stackTraceError) {\n copyStackTrace(error, stackTraceError);\n }\n reject(error);\n return;\n }\n\n // when fake timers are used we want to simulate the interval time passing\n if (fakeTimeRemaining <= 0) {\n handleTimeout();\n return;\n } else {\n fakeTimeRemaining -= interval;\n }\n\n // we *could* (maybe should?) use `advanceTimersToNextTimer` but it's\n // possible that could make this loop go on forever if someone is using\n // third party code that's setting up recursive timers so rapidly that\n // the user's timer's don't get a chance to resolve. So we'll advance\n // by an interval instead. (We have a test for this case).\n await act(async () => await jest.advanceTimersByTime(interval));\n\n // It's really important that checkExpectation is run *before* we flush\n // in-flight promises. To be honest, I'm not sure why, and I can't quite\n // think of a way to reproduce the problem in a test, but I spent\n // an entire day banging my head against a wall on this.\n checkExpectation();\n\n // In this rare case, we *need* to wait for in-flight promises\n // to resolve before continuing. We don't need to take advantage\n // of parallelization so we're fine.\n // https://stackoverflow.com/a/59243586/971592\n await flushMicroTasks();\n }\n } else {\n overallTimeoutTimer = setTimeout(handleTimeout, timeout);\n intervalId = setInterval(checkRealTimersCallback, interval);\n checkExpectation();\n }\n\n function onDone(done: { type: 'result'; result: T } | { type: 'error'; error: unknown }) {\n finished = true;\n if (overallTimeoutTimer) {\n clearTimeout(overallTimeoutTimer);\n }\n\n if (!usingFakeTimers) {\n clearInterval(intervalId);\n }\n\n if (done.type === 'error') {\n reject(done.error);\n } else {\n resolve(done.result);\n }\n }\n\n function checkRealTimersCallback() {\n if (jestFakeTimersAreEnabled()) {\n const error = new Error(\n `Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830`,\n );\n if (stackTraceError) {\n copyStackTrace(error, stackTraceError);\n }\n return reject(error);\n } else {\n return checkExpectation();\n }\n }\n\n function checkExpectation() {\n if (promiseStatus === 'pending') return;\n try {\n const result = expectation();\n\n // @ts-expect-error result can be a promise\n if (typeof result?.then === 'function') {\n const promiseResult: Promise<T> = result as unknown as Promise<T>;\n promiseStatus = 'pending';\n // eslint-disable-next-line promise/catch-or-return, promise/prefer-await-to-then\n promiseResult.then(\n (resolvedValue) => {\n promiseStatus = 'resolved';\n onDone({ type: 'result', result: resolvedValue });\n return;\n },\n (rejectedValue) => {\n promiseStatus = 'rejected';\n lastError = rejectedValue;\n return;\n },\n );\n } else {\n onDone({ type: 'result', result: result });\n }\n // If `callback` throws, wait for the next mutation, interval, or timeout.\n } catch (error) {\n // Save the most recent callback error to reject the promise with it in the event of a timeout\n lastError = error;\n }\n }\n\n function handleTimeout() {\n let error: Error;\n if (lastError) {\n if (lastError instanceof Error) {\n error = lastError;\n } else {\n error = new Error(String(lastError));\n }\n\n if (stackTraceError) {\n copyStackTrace(error, stackTraceError);\n }\n } else {\n error = new Error('Timed out in waitFor.');\n if (stackTraceError) {\n copyStackTrace(error, stackTraceError);\n }\n }\n if (typeof onTimeout === 'function') {\n const result = onTimeout(error);\n if (result) {\n error = result;\n }\n }\n onDone({ type: 'error', error });\n }\n });\n}\n\nexport default function waitFor<T>(expectation: () => T, options?: WaitForOptions): Promise<T> {\n // Being able to display a useful stack trace requires generating it before doing anything async\n const stackTraceError = new ErrorWithStack('STACK_TRACE_ERROR', waitFor);\n const optionsWithStackTrace = { stackTraceError, ...options };\n\n return wrapAsync(() => waitForInternal(expectation, optionsWithStackTrace));\n}\n"],"mappings":";;;;;;AACA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAAiD,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AANjD;;AAQA,MAAMG,gBAAgB,GAAG,EAAE;AAS3B,SAASC,eAAeA,CACtBC,WAAoB,EACpB;EACEC,OAAO,GAAG,IAAAC,iBAAS,EAAC,CAAC,CAACC,gBAAgB;EACtCC,QAAQ,GAAGN,gBAAgB;EAC3BO,eAAe;EACfC;AACc,CAAC,EACL;EACZ,IAAI,OAAON,WAAW,KAAK,UAAU,EAAE;IACrC,MAAM,IAAIO,SAAS,CAAC,+CAA+C,CAAC;EACtE;;EAEA;EACA,OAAO,IAAIC,OAAO,CAAC,OAAOC,OAAO,EAAEC,MAAM,KAAK;IAC5C,IAAIC,SAAkB,EAAEC,UAAyC;IACjE,IAAIC,QAAQ,GAAG,KAAK;IACpB,IAAIC,aAAa,GAAG,MAAM;IAE1B,IAAIC,mBAA0C,GAAG,IAAI;IAErD,MAAMC,eAAe,GAAG,IAAAC,gCAAwB,EAAC,CAAC;IAElD,IAAID,eAAe,EAAE;MACnBE,gBAAgB,CAAC,CAAC;MAClB;MACA;MACA;MACA;MACA,IAAIC,iBAAiB,GAAGlB,OAAO;MAC/B,OAAO,CAACY,QAAQ,EAAE;QAChB,IAAI,CAAC,IAAAI,gCAAwB,EAAC,CAAC,EA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,CAAC;QACxC;MACF,CAAC,MAAM;QACLe,KAAK,GAAG,IAAIC,KAAK,CAAC,uBAAuB,CAAC;QAC1C,IAAIhB,eAAe,EAAE;UACnB,IAAAiB,sBAAc,EAACF,KAAK,EAAEf,eAAe,CAAC;QACxC;MACF;MACA,IAAI,OAAOC,SAAS,KAAK,UAAU,EAAE;QACnC,MAAM8B,MAAM,GAAG9B,SAAS,CAACc,KAAK,CAAC;QAC/B,IAAIgB,MAAM,EAAE;UACVhB,KAAK,GAAGgB,MAAM;QAChB;MACF;MACAL,MAAM,CAAC;QAAEI,IAAI,EAAE,OAAO;QAAEf;MAAM,CAAC,CAAC;IAClC;EACF,CAAC,CAAC;AACJ;AAEe,SAASsB,OAAOA,CAAI1C,WAAoB,EAAE2C,OAAwB,EAAc;EAC7F;EACA,MAAMtC,eAAe,GAAG,IAAIuC,sBAAc,CAAC,mBAAmB,EAAEF,OAAO,CAAC;EACxE,MAAMG,qBAAqB,GAAG;IAAExC,eAAe;IAAE,GAAGsC;EAAQ,CAAC;EAE7D,OAAO,IAAAG,oBAAS,EAAC,MAAM/C,eAAe,CAACC,WAAW,EAAE6C,qBAAqB,CAAC,CAAC;AAC7E","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"wait-for.js","names":["_act","require","_config","_flushMicroTasks","_errors","_timers","_wrapAsync","DEFAULT_INTERVAL","waitForInternal","expectation","timeout","getConfig","asyncUtilTimeout","interval","stackTraceError","onTimeout","TypeError","Promise","resolve","reject","lastError","intervalId","finished","promiseStatus","overallTimeoutTimer","fakeTimersType","getJestFakeTimersType","checkExpectation","fakeTimeRemaining","jestFakeTimersAreEnabled","error","Error","copyStackTrace","handleTimeout","act","jest","advanceTimersByTimeAsync","advanceTimersByTime","flushMicroTasks","setTimeout","setInterval","checkRealTimersCallback","onDone","done","clearTimeout","clearInterval","type","result","then","promiseResult","resolvedValue","rejectedValue","String","waitFor","options","ErrorWithStack","optionsWithStackTrace","wrapAsync"],"sources":["../src/wait-for.ts"],"sourcesContent":["/* globals jest */\nimport { act } from './act';\nimport { getConfig } from './config';\nimport { flushMicroTasks } from './flush-micro-tasks';\nimport { copyStackTrace, ErrorWithStack } from './helpers/errors';\nimport {\n clearTimeout,\n getJestFakeTimersType,\n jestFakeTimersAreEnabled,\n setTimeout,\n} from './helpers/timers';\nimport { wrapAsync } from './helpers/wrap-async';\n\nconst DEFAULT_INTERVAL = 50;\n\nexport type WaitForOptions = {\n timeout?: number;\n interval?: number;\n stackTraceError?: ErrorWithStack;\n onTimeout?: (error: Error) => Error;\n};\n\nfunction waitForInternal<T>(\n expectation: () => T,\n {\n timeout = getConfig().asyncUtilTimeout,\n interval = DEFAULT_INTERVAL,\n stackTraceError,\n onTimeout,\n }: WaitForOptions,\n): Promise<T> {\n if (typeof expectation !== 'function') {\n throw new TypeError('Received `expectation` arg must be a function');\n }\n\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n let lastError: unknown, intervalId: ReturnType<typeof setTimeout>;\n let finished = false;\n let promiseStatus = 'idle';\n\n let overallTimeoutTimer: NodeJS.Timeout | null = null;\n\n const fakeTimersType = getJestFakeTimersType();\n\n if (fakeTimersType) {\n checkExpectation();\n // this is a dangerous rule to disable because it could lead to an\n // infinite loop. However, eslint isn't smart enough to know that we're\n // setting finished inside `onDone` which will be called when we're done\n // waiting or when we've timed out.\n let fakeTimeRemaining = timeout;\n while (!finished) {\n if (!jestFakeTimersAreEnabled()) {\n const error = new Error(\n `Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830`,\n );\n if (stackTraceError) {\n copyStackTrace(error, stackTraceError);\n }\n reject(error);\n return;\n }\n\n // when fake timers are used we want to simulate the interval time passing\n if (fakeTimeRemaining <= 0) {\n handleTimeout();\n return;\n } else {\n fakeTimeRemaining -= interval;\n }\n\n // we *could* (maybe should?) use `advanceTimersToNextTimer` but it's\n // possible that could make this loop go on forever if someone is using\n // third party code that's setting up recursive timers so rapidly that\n // the user's timer's don't get a chance to resolve. So we'll advance\n // by an interval instead. (We have a test for this case).\n await act(() =>\n fakeTimersType === 'modern'\n ? jest.advanceTimersByTimeAsync(interval)\n : jest.advanceTimersByTime(interval),\n );\n\n // It's really important that checkExpectation is run *before* we flush\n // in-flight promises. To be honest, I'm not sure why, and I can't quite\n // think of a way to reproduce the problem in a test, but I spent\n // an entire day banging my head against a wall on this.\n checkExpectation();\n\n // In this rare case, we *need* to wait for in-flight promises\n // to resolve before continuing. We don't need to take advantage\n // of parallelization so we're fine.\n // https://stackoverflow.com/a/59243586/971592\n await flushMicroTasks();\n }\n } else {\n overallTimeoutTimer = setTimeout(handleTimeout, timeout);\n intervalId = setInterval(checkRealTimersCallback, interval);\n checkExpectation();\n }\n\n function onDone(done: { type: 'result'; result: T } | { type: 'error'; error: unknown }) {\n finished = true;\n if (overallTimeoutTimer) {\n clearTimeout(overallTimeoutTimer);\n }\n\n if (!fakeTimersType) {\n clearInterval(intervalId);\n }\n\n if (done.type === 'error') {\n reject(done.error);\n } else {\n resolve(done.result);\n }\n }\n\n function checkRealTimersCallback() {\n if (jestFakeTimersAreEnabled()) {\n const error = new Error(\n `Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830`,\n );\n if (stackTraceError) {\n copyStackTrace(error, stackTraceError);\n }\n return reject(error);\n } else {\n return checkExpectation();\n }\n }\n\n function checkExpectation() {\n if (promiseStatus === 'pending') return;\n try {\n const result = expectation();\n\n // @ts-expect-error result can be a promise\n if (typeof result?.then === 'function') {\n const promiseResult: Promise<T> = result as unknown as Promise<T>;\n promiseStatus = 'pending';\n // eslint-disable-next-line promise/catch-or-return, promise/prefer-await-to-then\n promiseResult.then(\n (resolvedValue) => {\n promiseStatus = 'resolved';\n onDone({ type: 'result', result: resolvedValue });\n return;\n },\n (rejectedValue) => {\n promiseStatus = 'rejected';\n lastError = rejectedValue;\n return;\n },\n );\n } else {\n onDone({ type: 'result', result: result });\n }\n // If `callback` throws, wait for the next mutation, interval, or timeout.\n } catch (error) {\n // Save the most recent callback error to reject the promise with it in the event of a timeout\n lastError = error;\n }\n }\n\n function handleTimeout() {\n let error: Error;\n if (lastError) {\n if (lastError instanceof Error) {\n error = lastError;\n } else {\n error = new Error(String(lastError));\n }\n\n if (stackTraceError) {\n copyStackTrace(error, stackTraceError);\n }\n } else {\n error = new Error('Timed out in waitFor.');\n if (stackTraceError) {\n copyStackTrace(error, stackTraceError);\n }\n }\n if (typeof onTimeout === 'function') {\n const result = onTimeout(error);\n if (result) {\n error = result;\n }\n }\n onDone({ type: 'error', error });\n }\n });\n}\n\nexport function waitFor<T>(expectation: () => T, options?: WaitForOptions): Promise<T> {\n // Being able to display a useful stack trace requires generating it before doing anything async\n const stackTraceError = new ErrorWithStack('STACK_TRACE_ERROR', waitFor);\n const optionsWithStackTrace = { stackTraceError, ...options };\n\n return wrapAsync(() => waitForInternal(expectation, optionsWithStackTrace));\n}\n"],"mappings":";;;;;;AACA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAMA,IAAAK,UAAA,GAAAL,OAAA;AAXA;;AAaA,MAAMM,gBAAgB,GAAG,EAAE;AAS3B,SAASC,eAAeA,CACtBC,WAAoB,EACpB;EACEC,OAAO,GAAG,IAAAC,iBAAS,EAAC,CAAC,CAACC,gBAAgB;EACtCC,QAAQ,GAAGN,gBAAgB;EAC3BO,eAAe;EACfC;AACc,CAAC,EACL;EACZ,IAAI,OAAON,WAAW,KAAK,UAAU,EAAE;IACrC,MAAM,IAAIO,SAAS,CAAC,+CAA+C,CAAC;EACtE;;EAEA;EACA,OAAO,IAAIC,OAAO,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}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testing-library/react-native",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.5",
|
|
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",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"test:ci": "jest --maxWorkers=2",
|
|
29
29
|
"test:ci:coverage": "jest --maxWorkers=2 --collectCoverage=true --coverage-provider=v8",
|
|
30
30
|
"typecheck": "tsc",
|
|
31
|
-
"copy-flowtypes": "cp typings/index.flow.js build",
|
|
32
31
|
"lint": "eslint src --cache",
|
|
33
32
|
"validate": "yarn prettier && yarn lint && yarn typecheck && yarn test",
|
|
33
|
+
"validate:write": "yarn prettier:write && yarn lint --fix && yarn typecheck && yarn test -u",
|
|
34
34
|
"build:js": "babel src --out-dir build --extensions \".js,.ts,.jsx,.tsx\" --source-maps --ignore \"**/__tests__/**\"",
|
|
35
35
|
"build:ts": "tsc --build tsconfig.release.json",
|
|
36
|
-
"build": "yarn clean && yarn build:js && yarn build:ts
|
|
36
|
+
"build": "yarn clean && yarn build:js && yarn build:ts",
|
|
37
37
|
"release": "release-it",
|
|
38
38
|
"release:rc": "release-it --preRelease=rc",
|
|
39
39
|
"release:alpha": "release-it --preRelease=alpha",
|
|
@@ -46,8 +46,7 @@
|
|
|
46
46
|
"matchers.d.ts",
|
|
47
47
|
"pure.js",
|
|
48
48
|
"pure.d.ts",
|
|
49
|
-
"dont-cleanup-after-each.js"
|
|
50
|
-
"typings/index.flow.js"
|
|
49
|
+
"dont-cleanup-after-each.js"
|
|
51
50
|
],
|
|
52
51
|
"dependencies": {
|
|
53
52
|
"jest-matcher-utils": "^30.2.0",
|
|
@@ -58,7 +57,7 @@
|
|
|
58
57
|
"peerDependencies": {
|
|
59
58
|
"jest": ">=29.0.0",
|
|
60
59
|
"react": ">=19.0.0",
|
|
61
|
-
"react-native": ">=0.
|
|
60
|
+
"react-native": ">=0.78",
|
|
62
61
|
"universal-test-renderer": "~0.10.1"
|
|
63
62
|
},
|
|
64
63
|
"peerDependenciesMeta": {
|
|
@@ -71,11 +70,10 @@
|
|
|
71
70
|
"@babel/core": "^7.28.5",
|
|
72
71
|
"@babel/plugin-transform-strict-mode": "^7.27.1",
|
|
73
72
|
"@babel/preset-env": "^7.28.5",
|
|
74
|
-
"@babel/preset-flow": "^7.27.1",
|
|
75
73
|
"@babel/preset-react": "^7.28.5",
|
|
76
74
|
"@babel/preset-typescript": "^7.28.5",
|
|
77
75
|
"@callstack/eslint-config": "^15.0.0",
|
|
78
|
-
"@react-native/babel-preset": "0.
|
|
76
|
+
"@react-native/babel-preset": "0.83.1",
|
|
79
77
|
"@release-it/conventional-changelog": "^10.0.2",
|
|
80
78
|
"@relmify/jest-serializer-strip-ansi": "^1.0.2",
|
|
81
79
|
"@types/jest": "^30.0.0",
|
|
@@ -86,11 +84,10 @@
|
|
|
86
84
|
"del-cli": "^7.0.0",
|
|
87
85
|
"eslint": "^9.39.1",
|
|
88
86
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
89
|
-
"flow-bin": "~0.170.0",
|
|
90
87
|
"jest": "^30.2.0",
|
|
91
88
|
"prettier": "^3.6.2",
|
|
92
|
-
"react": "19.
|
|
93
|
-
"react-native": "0.
|
|
89
|
+
"react": "19.2.0",
|
|
90
|
+
"react-native": "0.83.1",
|
|
94
91
|
"react-native-gesture-handler": "^2.29.1",
|
|
95
92
|
"release-it": "^19.0.6",
|
|
96
93
|
"typescript": "^5.9.3",
|
|
@@ -102,6 +99,6 @@
|
|
|
102
99
|
},
|
|
103
100
|
"packageManager": "yarn@4.11.0",
|
|
104
101
|
"engines": {
|
|
105
|
-
"node": ">=
|
|
102
|
+
"node": ">=20"
|
|
106
103
|
}
|
|
107
104
|
}
|
package/build/index.flow.js
DELETED
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
type GetReturn = ReactTestInstance;
|
|
5
|
-
type GetAllReturn = Array<ReactTestInstance>;
|
|
6
|
-
type QueryReturn = ReactTestInstance | null;
|
|
7
|
-
type QueryAllReturn = Array<ReactTestInstance> | [];
|
|
8
|
-
type FindReturn = Promise<ReactTestInstance>;
|
|
9
|
-
type FindAllReturn = Promise<ReactTestInstance[]>;
|
|
10
|
-
|
|
11
|
-
type CommonQueryOptions = {
|
|
12
|
-
includeHiddenElements?: boolean,
|
|
13
|
-
hidden?: boolean,
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
type TextMatch = string | RegExp;
|
|
17
|
-
|
|
18
|
-
declare type NormalizerFn = (textToNormalize: string) => string;
|
|
19
|
-
declare type NormalizerConfig = {
|
|
20
|
-
trim?: boolean,
|
|
21
|
-
collapseWhitespace?: boolean,
|
|
22
|
-
};
|
|
23
|
-
declare type TextMatchOptions = {
|
|
24
|
-
exact?: boolean,
|
|
25
|
-
normalizer?: NormalizerFn,
|
|
26
|
-
};
|
|
27
|
-
declare type A11yRole =
|
|
28
|
-
| 'none'
|
|
29
|
-
| 'button'
|
|
30
|
-
| 'link'
|
|
31
|
-
| 'search'
|
|
32
|
-
| 'image'
|
|
33
|
-
| 'keyboardkey'
|
|
34
|
-
| 'text'
|
|
35
|
-
| 'adjustable'
|
|
36
|
-
| 'imagebutton'
|
|
37
|
-
| 'header'
|
|
38
|
-
| 'summary'
|
|
39
|
-
| 'alert'
|
|
40
|
-
| 'checkbox'
|
|
41
|
-
| 'combobox'
|
|
42
|
-
| 'menu'
|
|
43
|
-
| 'menubar'
|
|
44
|
-
| 'menuitem'
|
|
45
|
-
| 'progressbar'
|
|
46
|
-
| 'radio'
|
|
47
|
-
| 'radiogroup'
|
|
48
|
-
| 'scrollbar'
|
|
49
|
-
| 'spinbutton'
|
|
50
|
-
| 'switch'
|
|
51
|
-
| 'tab'
|
|
52
|
-
| 'tablist'
|
|
53
|
-
| 'timer'
|
|
54
|
-
| 'toolbar';
|
|
55
|
-
|
|
56
|
-
declare type A11yState = {|
|
|
57
|
-
disabled?: boolean,
|
|
58
|
-
selected?: boolean,
|
|
59
|
-
checked?: boolean | 'mixed',
|
|
60
|
-
busy?: boolean,
|
|
61
|
-
expanded?: boolean,
|
|
62
|
-
|};
|
|
63
|
-
|
|
64
|
-
declare type A11yValue = {
|
|
65
|
-
min?: number,
|
|
66
|
-
max?: number,
|
|
67
|
-
now?: number,
|
|
68
|
-
text?: TextMatch,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
type WaitForOptions = {
|
|
72
|
-
timeout?: number,
|
|
73
|
-
interval?: number,
|
|
74
|
-
onTimeout?: (error: Error) => Error,
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
type WaitForFunction = <T = any>(expectation: () => T, options?: WaitForOptions) => Promise<T>;
|
|
78
|
-
|
|
79
|
-
type ByTextOptions = CommonQueryOptions & TextMatchOptions;
|
|
80
|
-
|
|
81
|
-
interface ByTextQueries {
|
|
82
|
-
getByText: (text: TextMatch, options?: ByTextOptions) => ReactTestInstance;
|
|
83
|
-
getAllByText: (text: TextMatch, options?: ByTextOptions) => Array<ReactTestInstance>;
|
|
84
|
-
queryByText: (name: TextMatch, options?: ByTextOptions) => ReactTestInstance | null;
|
|
85
|
-
queryAllByText: (text: TextMatch, options?: ByTextOptions) => Array<ReactTestInstance> | [];
|
|
86
|
-
findByText: (
|
|
87
|
-
text: TextMatch,
|
|
88
|
-
queryOptions?: ByTextOptions,
|
|
89
|
-
waitForOptions?: WaitForOptions,
|
|
90
|
-
) => FindReturn;
|
|
91
|
-
findAllByText: (
|
|
92
|
-
text: TextMatch,
|
|
93
|
-
queryOptions?: ByTextOptions,
|
|
94
|
-
waitForOptions?: WaitForOptions,
|
|
95
|
-
) => FindAllReturn;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
type ByTestIdOptions = CommonQueryOptions & TextMatchOptions;
|
|
99
|
-
|
|
100
|
-
interface ByTestIdQueries {
|
|
101
|
-
getByTestId: (testID: TextMatch, options?: ByTestIdOptions) => ReactTestInstance;
|
|
102
|
-
getAllByTestId: (testID: TextMatch, options?: ByTestIdOptions) => Array<ReactTestInstance>;
|
|
103
|
-
queryByTestId: (testID: TextMatch, options?: ByTestIdOptions) => ReactTestInstance | null;
|
|
104
|
-
queryAllByTestId: (testID: TextMatch, options?: ByTestIdOptions) => Array<ReactTestInstance> | [];
|
|
105
|
-
findByTestId: (
|
|
106
|
-
testID: TextMatch,
|
|
107
|
-
queryOptions?: ByTestIdOptions,
|
|
108
|
-
waitForOptions?: WaitForOptions,
|
|
109
|
-
) => FindReturn;
|
|
110
|
-
findAllByTestId: (
|
|
111
|
-
testID: TextMatch,
|
|
112
|
-
queryOptions?: ByTestIdOptions,
|
|
113
|
-
waitForOptions?: WaitForOptions,
|
|
114
|
-
) => FindAllReturn;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
type ByDisplayValueOptions = CommonQueryOptions & TextMatchOptions;
|
|
118
|
-
|
|
119
|
-
interface ByDisplayValueQueries {
|
|
120
|
-
getByDisplayValue: (value: TextMatch, options?: ByDisplayValueOptions) => ReactTestInstance;
|
|
121
|
-
getAllByDisplayValue: (
|
|
122
|
-
value: TextMatch,
|
|
123
|
-
options?: ByDisplayValueOptions,
|
|
124
|
-
) => Array<ReactTestInstance>;
|
|
125
|
-
queryByDisplayValue: (
|
|
126
|
-
value: TextMatch,
|
|
127
|
-
options?: ByDisplayValueOptions,
|
|
128
|
-
) => ReactTestInstance | null;
|
|
129
|
-
queryAllByDisplayValue: (
|
|
130
|
-
value: TextMatch,
|
|
131
|
-
options?: ByDisplayValueOptions,
|
|
132
|
-
) => Array<ReactTestInstance> | [];
|
|
133
|
-
findByDisplayValue: (
|
|
134
|
-
value: TextMatch,
|
|
135
|
-
queryOptions?: ByDisplayValueOptions,
|
|
136
|
-
waitForOptions?: WaitForOptions,
|
|
137
|
-
) => FindReturn;
|
|
138
|
-
findAllByDisplayValue: (
|
|
139
|
-
value: TextMatch,
|
|
140
|
-
queryOptions?: ByDisplayValueOptions,
|
|
141
|
-
waitForOptions?: WaitForOptions,
|
|
142
|
-
) => FindAllReturn;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
type ByPlaceholderTextOptions = CommonQueryOptions & TextMatchOptions;
|
|
146
|
-
|
|
147
|
-
interface ByPlaceholderTextQueries {
|
|
148
|
-
getByPlaceholderText: (
|
|
149
|
-
placeholder: TextMatch,
|
|
150
|
-
options?: ByPlaceholderTextOptions,
|
|
151
|
-
) => ReactTestInstance;
|
|
152
|
-
getAllByPlaceholderText: (
|
|
153
|
-
placeholder: TextMatch,
|
|
154
|
-
options?: ByPlaceholderTextOptions,
|
|
155
|
-
) => Array<ReactTestInstance>;
|
|
156
|
-
queryByPlaceholderText: (
|
|
157
|
-
placeholder: TextMatch,
|
|
158
|
-
options?: ByPlaceholderTextOptions,
|
|
159
|
-
) => ReactTestInstance | null;
|
|
160
|
-
queryAllByPlaceholderText: (
|
|
161
|
-
placeholder: TextMatch,
|
|
162
|
-
options?: ByPlaceholderTextOptions,
|
|
163
|
-
) => Array<ReactTestInstance> | [];
|
|
164
|
-
findByPlaceholderText: (
|
|
165
|
-
placeholder: TextMatch,
|
|
166
|
-
queryOptions?: ByPlaceholderTextOptions,
|
|
167
|
-
waitForOptions?: WaitForOptions,
|
|
168
|
-
) => FindReturn;
|
|
169
|
-
findAllByPlaceholderText: (
|
|
170
|
-
placeholder: TextMatch,
|
|
171
|
-
queryOptions?: ByPlaceholderTextOptions,
|
|
172
|
-
waitForOptions?: WaitForOptions,
|
|
173
|
-
) => FindAllReturn;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
interface UnsafeByTypeQueries {
|
|
177
|
-
UNSAFE_getByType: <P>(type: React.ComponentType<P>) => ReactTestInstance;
|
|
178
|
-
UNSAFE_getAllByType: <P>(type: React.ComponentType<P>) => Array<ReactTestInstance>;
|
|
179
|
-
UNSAFE_queryByType: <P>(type: React.ComponentType<P>) => ReactTestInstance | null;
|
|
180
|
-
UNSAFE_queryAllByType: <P>(type: React.ComponentType<P>) => Array<ReactTestInstance> | [];
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
interface UnsafeByPropsQueries {
|
|
184
|
-
UNSAFE_getByProps: (props: { [string]: any }) => ReactTestInstance;
|
|
185
|
-
UNSAFE_getAllByProps: (props: { [string]: any }) => Array<ReactTestInstance>;
|
|
186
|
-
UNSAFE_queryByProps: (props: { [string]: any }) => ReactTestInstance | null;
|
|
187
|
-
UNSAFE_queryAllByProps: (props: { [string]: any }) => Array<ReactTestInstance> | [];
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
type ByRoleOptions = CommonQueryOptions & {
|
|
191
|
-
...A11yState,
|
|
192
|
-
name?: string,
|
|
193
|
-
value?: A11yValue,
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
type ByLabelTextOptions = CommonQueryOptions & TextMatchOptions;
|
|
197
|
-
type ByHintTextOptions = CommonQueryOptions & TextMatchOptions;
|
|
198
|
-
|
|
199
|
-
interface A11yAPI {
|
|
200
|
-
// Label
|
|
201
|
-
getByLabelText: (matcher: TextMatch, options?: ByLabelTextOptions) => GetReturn;
|
|
202
|
-
getAllByLabelText: (matcher: TextMatch, options?: ByLabelTextOptions) => GetAllReturn;
|
|
203
|
-
queryByLabelText: (matcher: TextMatch, options?: ByLabelTextOptions) => QueryReturn;
|
|
204
|
-
queryAllByLabelText: (matcher: TextMatch, options?: ByLabelTextOptions) => QueryAllReturn;
|
|
205
|
-
findByLabelText: (
|
|
206
|
-
matcher: TextMatch,
|
|
207
|
-
queryOptions?: ByLabelTextOptions,
|
|
208
|
-
waitForOptions?: WaitForOptions,
|
|
209
|
-
) => FindReturn;
|
|
210
|
-
findAllByLabelText: (
|
|
211
|
-
matcher: TextMatch,
|
|
212
|
-
queryOptions?: ByLabelTextOptions,
|
|
213
|
-
waitForOptions?: WaitForOptions,
|
|
214
|
-
) => FindAllReturn;
|
|
215
|
-
|
|
216
|
-
// Hint
|
|
217
|
-
getByA11yHint: (matcher: TextMatch, options?: ByHintTextOptions) => GetReturn;
|
|
218
|
-
getByHintText: (matcher: TextMatch, options?: ByHintTextOptions) => GetReturn;
|
|
219
|
-
getAllByA11yHint: (matcher: TextMatch, options?: ByHintTextOptions) => GetAllReturn;
|
|
220
|
-
getAllByHintText: (matcher: TextMatch, options?: ByHintTextOptions) => GetAllReturn;
|
|
221
|
-
queryByA11yHint: (matcher: TextMatch, options?: ByHintTextOptions) => QueryReturn;
|
|
222
|
-
queryByHintText: (matcher: TextMatch, options?: ByHintTextOptions) => QueryReturn;
|
|
223
|
-
queryAllByA11yHint: (matcher: TextMatch, options?: ByHintTextOptions) => QueryAllReturn;
|
|
224
|
-
queryAllByHintText: (matcher: TextMatch, options?: ByHintTextOptions) => QueryAllReturn;
|
|
225
|
-
findByA11yHint: (
|
|
226
|
-
matcher: TextMatch,
|
|
227
|
-
queryOptions?: ByHintTextOptions,
|
|
228
|
-
waitForOptions?: WaitForOptions,
|
|
229
|
-
) => FindReturn;
|
|
230
|
-
findByHintText: (
|
|
231
|
-
matcher: TextMatch,
|
|
232
|
-
queryOptions?: ByHintTextOptions,
|
|
233
|
-
waitForOptions?: WaitForOptions,
|
|
234
|
-
) => FindReturn;
|
|
235
|
-
findAllByA11yHint: (
|
|
236
|
-
matcher: TextMatch,
|
|
237
|
-
queryOptions?: ByHintTextOptions,
|
|
238
|
-
waitForOptions?: WaitForOptions,
|
|
239
|
-
) => FindAllReturn;
|
|
240
|
-
findAllByHintText: (
|
|
241
|
-
matcher: TextMatch,
|
|
242
|
-
queryOptions?: ByHintTextOptions,
|
|
243
|
-
waitForOptions?: WaitForOptions,
|
|
244
|
-
) => FindAllReturn;
|
|
245
|
-
|
|
246
|
-
// Role
|
|
247
|
-
getByRole: (matcher: A11yRole | RegExp, role?: ByRoleOptions) => GetReturn;
|
|
248
|
-
getAllByRole: (matcher: A11yRole | RegExp, options?: ByRoleOptions) => GetAllReturn;
|
|
249
|
-
queryByRole: (matcher: A11yRole | RegExp, options?: ByRoleOptions) => QueryReturn;
|
|
250
|
-
queryAllByRole: (matcher: A11yRole | RegExp, options?: ByRoleOptions) => QueryAllReturn;
|
|
251
|
-
findByRole: (
|
|
252
|
-
matcher: A11yRole | RegExp,
|
|
253
|
-
queryOptions?: ByRoleOptions,
|
|
254
|
-
waitForOptions?: WaitForOptions,
|
|
255
|
-
) => FindReturn;
|
|
256
|
-
findAllByRole: (
|
|
257
|
-
matcher: A11yRole | RegExp,
|
|
258
|
-
queryOptions?: ByRoleOptions,
|
|
259
|
-
waitForOptions?: WaitForOptions,
|
|
260
|
-
) => FindAllReturn;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
interface Thenable {
|
|
264
|
-
then: (resolve: () => any, reject?: () => any) => any;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
type MapPropsFunction = (
|
|
268
|
-
props: { [string]: mixed },
|
|
269
|
-
node: ReactTestRendererJSON,
|
|
270
|
-
) => { [string]: mixed };
|
|
271
|
-
|
|
272
|
-
type DebugOptions = {
|
|
273
|
-
message?: string,
|
|
274
|
-
mapProps?: MapPropsFunction,
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
type Queries = ByTextQueries &
|
|
278
|
-
ByTestIdQueries &
|
|
279
|
-
ByDisplayValueQueries &
|
|
280
|
-
ByPlaceholderTextQueries &
|
|
281
|
-
UnsafeByTypeQueries &
|
|
282
|
-
UnsafeByPropsQueries &
|
|
283
|
-
A11yAPI;
|
|
284
|
-
|
|
285
|
-
type FireEventFunction = (
|
|
286
|
-
element: ReactTestInstance,
|
|
287
|
-
eventName: string,
|
|
288
|
-
...data: Array<any>
|
|
289
|
-
) => any;
|
|
290
|
-
|
|
291
|
-
type FireEventAPI = FireEventFunction & {
|
|
292
|
-
press: (element: ReactTestInstance, ...data: Array<any>) => any,
|
|
293
|
-
changeText: (element: ReactTestInstance, ...data: Array<any>) => any,
|
|
294
|
-
scroll: (element: ReactTestInstance, ...data: Array<any>) => any,
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
declare module '@testing-library/react-native' {
|
|
298
|
-
declare interface RenderResult extends Queries {
|
|
299
|
-
update(nextElement: React.Element<any>): void;
|
|
300
|
-
rerender(nextElement: React.Element<any>): void;
|
|
301
|
-
unmount(nextElement?: React.Element<any>): void;
|
|
302
|
-
toJSON(): ReactTestRendererJSON[] | ReactTestRendererJSON | null;
|
|
303
|
-
debug(options?: DebugOptions): void;
|
|
304
|
-
root: ReactTestInstance;
|
|
305
|
-
UNSAFE_root: ReactTestInstance;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
declare type RenderAPI = RenderResult;
|
|
309
|
-
|
|
310
|
-
declare interface RenderOptions {
|
|
311
|
-
wrapper?: React.ComponentType<any>;
|
|
312
|
-
createNodeMock?: (element: React.Element<any>) => any;
|
|
313
|
-
unstable_validateStringsRenderedWithinText?: boolean;
|
|
314
|
-
unstable_isConcurrent?: boolean;
|
|
315
|
-
unstable_strictMode?: boolean;
|
|
316
|
-
unstable_concurrentUpdatesByDefault?: boolean;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
declare export var render: (
|
|
320
|
-
component: React.Element<any>,
|
|
321
|
-
options?: RenderOptions,
|
|
322
|
-
) => RenderResult;
|
|
323
|
-
|
|
324
|
-
declare export var screen: RenderResult;
|
|
325
|
-
|
|
326
|
-
declare export var cleanup: () => void;
|
|
327
|
-
declare export var fireEvent: FireEventAPI;
|
|
328
|
-
|
|
329
|
-
declare export var waitFor: WaitForFunction;
|
|
330
|
-
|
|
331
|
-
declare type WaitForElementToBeRemovedFunction = <T = any>(
|
|
332
|
-
expectation: () => T,
|
|
333
|
-
options?: WaitForOptions,
|
|
334
|
-
) => Promise<T>;
|
|
335
|
-
|
|
336
|
-
declare export var waitForElementToBeRemoved: WaitForElementToBeRemovedFunction;
|
|
337
|
-
|
|
338
|
-
declare interface Config {
|
|
339
|
-
asyncUtilTimeout: number;
|
|
340
|
-
defaultIncludeHiddenElements: boolean;
|
|
341
|
-
defaultDebugOptions?: $Shape<DebugOptions>;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
declare interface ConfigAliasOptions {
|
|
345
|
-
/** Alias to `defaultIncludeHiddenElements` for RTL compatibility */
|
|
346
|
-
defaultHidden: boolean;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
declare export var configure: (options: $Shape<Config & ConfigAliasOptions>) => void;
|
|
350
|
-
declare export var resetToDefaults: () => void;
|
|
351
|
-
|
|
352
|
-
declare export var act: (callback: () => void) => Thenable;
|
|
353
|
-
declare export var within: (instance: ReactTestInstance) => Queries;
|
|
354
|
-
declare export var getQueriesForElement: (element: ReactTestInstance) => Queries;
|
|
355
|
-
|
|
356
|
-
declare export var getDefaultNormalizer: (normalizerConfig?: NormalizerConfig) => NormalizerFn;
|
|
357
|
-
|
|
358
|
-
declare export var isHiddenFromAccessibility: (element: ReactTestInstance | null) => boolean;
|
|
359
|
-
declare export var isInaccessible: (element: ReactTestInstance | null) => boolean;
|
|
360
|
-
|
|
361
|
-
declare type RenderHookResult<Result, Props> = {
|
|
362
|
-
rerender: (props: Props) => void,
|
|
363
|
-
result: { current: Result },
|
|
364
|
-
unmount: () => void,
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
declare type RenderHookOptions<Props> = {
|
|
368
|
-
initialProps?: Props,
|
|
369
|
-
wrapper?: React.ComponentType<any>,
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
declare type RenderHookFunction = <Result, Props>(
|
|
373
|
-
renderCallback: (props: Props) => Result,
|
|
374
|
-
options?: RenderHookOptions<Props>,
|
|
375
|
-
) => RenderHookResult<Result, Props>;
|
|
376
|
-
|
|
377
|
-
declare export var renderHook: RenderHookFunction;
|
|
378
|
-
}
|
package/build/render-act.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { Root, RootOptions } from 'universal-test-renderer';
|
|
2
|
-
export declare function renderWithAct(element: React.ReactElement, options?: RootOptions): Root;
|
|
3
|
-
export declare function renderWithAsyncAct(element: React.ReactElement, options?: RootOptions): Promise<Root>;
|
package/build/render-act.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.renderWithAct = renderWithAct;
|
|
7
|
-
exports.renderWithAsyncAct = renderWithAsyncAct;
|
|
8
|
-
var _universalTestRenderer = require("universal-test-renderer");
|
|
9
|
-
var _act = _interopRequireDefault(require("./act"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
function renderWithAct(element, options) {
|
|
12
|
-
const root = (0, _universalTestRenderer.createRoot)(options);
|
|
13
|
-
|
|
14
|
-
// This will be called synchronously.
|
|
15
|
-
void (0, _act.default)(() => {
|
|
16
|
-
root.render(element);
|
|
17
|
-
});
|
|
18
|
-
return root;
|
|
19
|
-
}
|
|
20
|
-
async function renderWithAsyncAct(element, options) {
|
|
21
|
-
const root = (0, _universalTestRenderer.createRoot)(options);
|
|
22
|
-
|
|
23
|
-
// eslint-disable-next-line require-await
|
|
24
|
-
await (0, _act.default)(async () => {
|
|
25
|
-
root.render(element);
|
|
26
|
-
});
|
|
27
|
-
return root;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=render-act.js.map
|
package/build/render-act.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render-act.js","names":["_universalTestRenderer","require","_act","_interopRequireDefault","e","__esModule","default","renderWithAct","element","options","root","createRoot","act","render","renderWithAsyncAct"],"sources":["../src/render-act.ts"],"sourcesContent":["import type { Root, RootOptions } from 'universal-test-renderer';\nimport { createRoot } from 'universal-test-renderer';\n\nimport act from './act';\n\nexport function renderWithAct(element: React.ReactElement, options?: RootOptions): Root {\n const root = createRoot(options);\n\n // This will be called synchronously.\n void act(() => {\n root.render(element);\n });\n\n return root;\n}\n\nexport async function renderWithAsyncAct(\n element: React.ReactElement,\n options?: RootOptions,\n): Promise<Root> {\n const root = createRoot(options);\n\n // eslint-disable-next-line require-await\n await act(async () => {\n root.render(element);\n });\n\n return root;\n}\n"],"mappings":";;;;;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AAEA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAwB,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEjB,SAASG,aAAaA,CAACC,OAA2B,EAAEC,OAAqB,EAAQ;EACtF,MAAMC,IAAI,GAAG,IAAAC,iCAAU,EAACF,OAAO,CAAC;;EAEhC;EACA,KAAK,IAAAG,YAAG,EAAC,MAAM;IACbF,IAAI,CAACG,MAAM,CAACL,OAAO,CAAC;EACtB,CAAC,CAAC;EAEF,OAAOE,IAAI;AACb;AAEO,eAAeI,kBAAkBA,CACtCN,OAA2B,EAC3BC,OAAqB,EACN;EACf,MAAMC,IAAI,GAAG,IAAAC,iCAAU,EAACF,OAAO,CAAC;;EAEhC;EACA,MAAM,IAAAG,YAAG,EAAC,YAAY;IACpBF,IAAI,CAACG,MAAM,CAACL,OAAO,CAAC;EACtB,CAAC,CAAC;EAEF,OAAOE,IAAI;AACb","ignoreList":[]}
|
package/build/render-async.d.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { HostElement } from 'universal-test-renderer';
|
|
3
|
-
import type { DebugOptions } from './helpers/debug';
|
|
4
|
-
export interface RenderAsyncOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Pass a React Component as the wrapper option to have it rendered around the inner element. This is most useful for creating
|
|
7
|
-
* reusable custom render functions for common data providers.
|
|
8
|
-
*/
|
|
9
|
-
wrapper?: React.ComponentType<any>;
|
|
10
|
-
createNodeMock?: (element: React.ReactElement) => unknown;
|
|
11
|
-
}
|
|
12
|
-
export type RenderAsyncResult = ReturnType<typeof renderAsync>;
|
|
13
|
-
/**
|
|
14
|
-
* Renders test component deeply using React Test Renderer and exposes helpers
|
|
15
|
-
* to assert on the output.
|
|
16
|
-
*/
|
|
17
|
-
export default function renderAsync<T>(component: React.ReactElement<T>, options?: RenderAsyncOptions): Promise<{
|
|
18
|
-
rerender: (_component: React.ReactElement) => never;
|
|
19
|
-
rerenderAsync: (component: React.ReactElement) => Promise<void>;
|
|
20
|
-
update: (_component: React.ReactElement) => never;
|
|
21
|
-
updateAsync: (component: React.ReactElement) => Promise<void>;
|
|
22
|
-
unmount: () => never;
|
|
23
|
-
unmountAsync: () => Promise<void>;
|
|
24
|
-
toJSON: () => import("universal-test-renderer").JsonElement | null;
|
|
25
|
-
debug: DebugFunction;
|
|
26
|
-
container: HostElement;
|
|
27
|
-
root: HostElement | null;
|
|
28
|
-
getByRole: import("./queries/make-queries").GetByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
29
|
-
getAllByRole: import("./queries/make-queries").GetAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
30
|
-
queryByRole: import("./queries/make-queries").QueryByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
31
|
-
queryAllByRole: import("./queries/make-queries").QueryAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
32
|
-
findByRole: import("./queries/make-queries").FindByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
33
|
-
findAllByRole: import("./queries/make-queries").FindAllByQuery<import("./queries/role").ByRoleMatcher, import("./queries/role").ByRoleOptions>;
|
|
34
|
-
getByHintText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
35
|
-
getAllByHintText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
36
|
-
queryByHintText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
37
|
-
queryAllByHintText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
38
|
-
findByHintText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
39
|
-
findAllByHintText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
40
|
-
getByA11yHint: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
41
|
-
getAllByA11yHint: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
42
|
-
queryByA11yHint: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
43
|
-
queryAllByA11yHint: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
44
|
-
findByA11yHint: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
45
|
-
findAllByA11yHint: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
46
|
-
getByAccessibilityHint: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
47
|
-
getAllByAccessibilityHint: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
48
|
-
queryByAccessibilityHint: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
49
|
-
queryAllByAccessibilityHint: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
50
|
-
findByAccessibilityHint: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
51
|
-
findAllByAccessibilityHint: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
52
|
-
getByLabelText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
53
|
-
getAllByLabelText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
54
|
-
queryByLabelText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
55
|
-
queryAllByLabelText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
56
|
-
findByLabelText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
57
|
-
findAllByLabelText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
58
|
-
getByPlaceholderText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
59
|
-
getAllByPlaceholderText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
60
|
-
queryByPlaceholderText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
61
|
-
queryAllByPlaceholderText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
62
|
-
findByPlaceholderText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
63
|
-
findAllByPlaceholderText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
64
|
-
getByDisplayValue: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
65
|
-
getAllByDisplayValue: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
66
|
-
queryByDisplayValue: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
67
|
-
queryAllByDisplayValue: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
68
|
-
findByDisplayValue: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
69
|
-
findAllByDisplayValue: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
70
|
-
getByTestId: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
71
|
-
getAllByTestId: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
72
|
-
queryByTestId: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
73
|
-
queryAllByTestId: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
74
|
-
findByTestId: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
75
|
-
findAllByTestId: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
76
|
-
getByText: import("./queries/make-queries").GetByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
77
|
-
getAllByText: import("./queries/make-queries").GetAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
78
|
-
queryByText: import("./queries/make-queries").QueryByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
79
|
-
queryAllByText: import("./queries/make-queries").QueryAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
80
|
-
findByText: import("./queries/make-queries").FindByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
81
|
-
findAllByText: import("./queries/make-queries").FindAllByQuery<import("./matches").TextMatch, import("./queries/options").CommonQueryOptions & import("./matches").TextMatchOptions>;
|
|
82
|
-
}>;
|
|
83
|
-
export type DebugFunction = (options?: DebugOptions) => void;
|