@react-native-harness/runtime 1.1.0-rc.1 → 1.1.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/collector/factory.d.ts.map +1 -1
- package/dist/collector/factory.js +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/collector/factory.ts +1 -0
- package/dist/NativeHarness.d.ts +0 -41
- package/dist/NativeHarness.d.ts.map +0 -1
- package/dist/NativeHarness.js +0 -2
- package/dist/render/queries.d.ts +0 -7
- package/dist/render/queries.d.ts.map +0 -1
- package/dist/render/queries.js +0 -99
- package/dist/runHarnessTestsInModule.d.ts +0 -9
- package/dist/runHarnessTestsInModule.d.ts.map +0 -1
- package/dist/runHarnessTestsInModule.js +0 -57
- package/dist/screen/index.d.ts +0 -50
- package/dist/screen/index.d.ts.map +0 -1
- package/dist/screen/index.js +0 -46
- package/dist/userEvent/index.d.ts +0 -16
- package/dist/userEvent/index.d.ts.map +0 -1
- package/dist/userEvent/index.js +0 -31
- package/dist/utils/hmr.d.ts +0 -2
- package/dist/utils/hmr.d.ts.map +0 -1
- package/dist/utils/hmr.js +0 -3
- package/dist/utils/parse-error-stack.d.ts +0 -9
- package/dist/utils/parse-error-stack.d.ts.map +0 -1
- package/dist/utils/parse-error-stack.js +0 -56
- package/out-tsc/vitest/src/__tests__/collector.test.d.ts +0 -2
- package/out-tsc/vitest/src/__tests__/collector.test.d.ts.map +0 -1
- package/out-tsc/vitest/src/__tests__/error-handling.test.d.ts +0 -2
- package/out-tsc/vitest/src/__tests__/error-handling.test.d.ts.map +0 -1
- package/out-tsc/vitest/src/__tests__/expect.test.d.ts +0 -2
- package/out-tsc/vitest/src/__tests__/expect.test.d.ts.map +0 -1
- package/out-tsc/vitest/src/__tests__/initialize.test.d.ts +0 -2
- package/out-tsc/vitest/src/__tests__/initialize.test.d.ts.map +0 -1
- package/out-tsc/vitest/src/__tests__/spy.test.d.ts +0 -2
- package/out-tsc/vitest/src/__tests__/spy.test.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/bundle.d.ts +0 -2
- package/out-tsc/vitest/src/bundler/bundle.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/errors.d.ts +0 -15
- package/out-tsc/vitest/src/bundler/errors.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/evaluate.d.ts +0 -2
- package/out-tsc/vitest/src/bundler/evaluate.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/factory.d.ts +0 -3
- package/out-tsc/vitest/src/bundler/factory.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/index.d.ts +0 -4
- package/out-tsc/vitest/src/bundler/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/types.d.ts +0 -7
- package/out-tsc/vitest/src/bundler/types.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/factory.d.ts +0 -2
- package/out-tsc/vitest/src/client/factory.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/getDeviceDescriptor.d.ts +0 -8
- package/out-tsc/vitest/src/client/getDeviceDescriptor.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/getWSServer.d.ts +0 -2
- package/out-tsc/vitest/src/client/getWSServer.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/index.d.ts +0 -2
- package/out-tsc/vitest/src/client/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/setup-files.d.ts +0 -12
- package/out-tsc/vitest/src/client/setup-files.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/store.d.ts +0 -4
- package/out-tsc/vitest/src/client/store.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/errors.d.ts +0 -8
- package/out-tsc/vitest/src/collector/errors.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/factory.d.ts +0 -3
- package/out-tsc/vitest/src/collector/factory.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/functions.d.ts +0 -22
- package/out-tsc/vitest/src/collector/functions.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/index.d.ts +0 -5
- package/out-tsc/vitest/src/collector/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/types.d.ts +0 -10
- package/out-tsc/vitest/src/collector/types.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/validation.d.ts +0 -4
- package/out-tsc/vitest/src/collector/validation.d.ts.map +0 -1
- package/out-tsc/vitest/src/constants.d.ts +0 -2
- package/out-tsc/vitest/src/constants.d.ts.map +0 -1
- package/out-tsc/vitest/src/disableHMRWhenReady.d.ts +0 -2
- package/out-tsc/vitest/src/disableHMRWhenReady.d.ts.map +0 -1
- package/out-tsc/vitest/src/entry-point.d.ts +0 -2
- package/out-tsc/vitest/src/entry-point.d.ts.map +0 -1
- package/out-tsc/vitest/src/errors.d.ts +0 -6
- package/out-tsc/vitest/src/errors.d.ts.map +0 -1
- package/out-tsc/vitest/src/expect/expect.d.ts +0 -9
- package/out-tsc/vitest/src/expect/expect.d.ts.map +0 -1
- package/out-tsc/vitest/src/expect/index.d.ts +0 -2
- package/out-tsc/vitest/src/expect/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/expect/matchers/toMatchImageSnapshot.d.ts +0 -13
- package/out-tsc/vitest/src/expect/matchers/toMatchImageSnapshot.d.ts.map +0 -1
- package/out-tsc/vitest/src/expect/setup.d.ts +0 -2
- package/out-tsc/vitest/src/expect/setup.d.ts.map +0 -1
- package/out-tsc/vitest/src/filtering/index.d.ts +0 -2
- package/out-tsc/vitest/src/filtering/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/filtering/testNameFilter.d.ts +0 -12
- package/out-tsc/vitest/src/filtering/testNameFilter.d.ts.map +0 -1
- package/out-tsc/vitest/src/globals.d.ts +0 -20
- package/out-tsc/vitest/src/globals.d.ts.map +0 -1
- package/out-tsc/vitest/src/index.d.ts +0 -11
- package/out-tsc/vitest/src/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/initialize.d.ts +0 -2
- package/out-tsc/vitest/src/initialize.d.ts.map +0 -1
- package/out-tsc/vitest/src/jest-mock.d.ts +0 -2
- package/out-tsc/vitest/src/jest-mock.d.ts.map +0 -1
- package/out-tsc/vitest/src/jsx/jsx-dev-runtime.d.ts +0 -3
- package/out-tsc/vitest/src/jsx/jsx-dev-runtime.d.ts.map +0 -1
- package/out-tsc/vitest/src/jsx/jsx-runtime.d.ts +0 -4
- package/out-tsc/vitest/src/jsx/jsx-runtime.d.ts.map +0 -1
- package/out-tsc/vitest/src/mocker/index.d.ts +0 -2
- package/out-tsc/vitest/src/mocker/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/mocker/registry.d.ts +0 -6
- package/out-tsc/vitest/src/mocker/registry.d.ts.map +0 -1
- package/out-tsc/vitest/src/mocker/types.d.ts +0 -6
- package/out-tsc/vitest/src/mocker/types.d.ts.map +0 -1
- package/out-tsc/vitest/src/namespace.d.ts +0 -18
- package/out-tsc/vitest/src/namespace.d.ts.map +0 -1
- package/out-tsc/vitest/src/polyfills.d.ts +0 -11
- package/out-tsc/vitest/src/polyfills.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/ErrorBoundary.d.ts +0 -17
- package/out-tsc/vitest/src/render/ErrorBoundary.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/TestComponentOverlay.d.ts +0 -3
- package/out-tsc/vitest/src/render/TestComponentOverlay.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/cleanup.d.ts +0 -2
- package/out-tsc/vitest/src/render/cleanup.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/index.d.ts +0 -6
- package/out-tsc/vitest/src/render/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/setup.d.ts +0 -2
- package/out-tsc/vitest/src/render/setup.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/types.d.ts +0 -12
- package/out-tsc/vitest/src/render/types.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/context.d.ts +0 -10
- package/out-tsc/vitest/src/runner/context.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/errors.d.ts +0 -11
- package/out-tsc/vitest/src/runner/errors.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/factory.d.ts +0 -3
- package/out-tsc/vitest/src/runner/factory.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/hooks.d.ts +0 -4
- package/out-tsc/vitest/src/runner/hooks.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/index.d.ts +0 -5
- package/out-tsc/vitest/src/runner/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/runSuite.d.ts +0 -7
- package/out-tsc/vitest/src/runner/runSuite.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/types.d.ts +0 -18
- package/out-tsc/vitest/src/runner/types.d.ts.map +0 -1
- package/out-tsc/vitest/src/screen/index.d.ts +0 -8
- package/out-tsc/vitest/src/screen/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/spy/index.d.ts +0 -2
- package/out-tsc/vitest/src/spy/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/symbolicate.d.ts +0 -17
- package/out-tsc/vitest/src/symbolicate.d.ts.map +0 -1
- package/out-tsc/vitest/src/ui/ReadyScreen.d.ts +0 -2
- package/out-tsc/vitest/src/ui/ReadyScreen.d.ts.map +0 -1
- package/out-tsc/vitest/src/ui/WrongEnvironmentScreen.d.ts +0 -2
- package/out-tsc/vitest/src/ui/WrongEnvironmentScreen.d.ts.map +0 -1
- package/out-tsc/vitest/src/ui/index.d.ts +0 -2
- package/out-tsc/vitest/src/ui/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/ui/state.d.ts +0 -20
- package/out-tsc/vitest/src/ui/state.d.ts.map +0 -1
- package/out-tsc/vitest/src/userEvent/index.d.ts +0 -6
- package/out-tsc/vitest/src/userEvent/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/utils/dev-server.d.ts +0 -2
- package/out-tsc/vitest/src/utils/dev-server.d.ts.map +0 -1
- package/out-tsc/vitest/src/utils/emitter.d.ts +0 -16
- package/out-tsc/vitest/src/utils/emitter.d.ts.map +0 -1
- package/out-tsc/vitest/src/waitFor.d.ts +0 -21
- package/out-tsc/vitest/src/waitFor.d.ts.map +0 -1
- package/out-tsc/vitest/tsconfig.spec.tsbuildinfo +0 -1
- package/out-tsc/vitest/vite.config.d.ts +0 -3
- package/out-tsc/vitest/vite.config.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/render/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAM5C,eAAO,MAAM,OAAO,GAAI,cAAc,YAAY,SAEjD,CAAC;AA6IF,QAAA,MACW,aAAa,8HACV,gBAAgB,yHACrB,WAAW,8HACR,cAAc,yHAChB,YAAY,gIACT,eAAe,gIAG3B,CAAC;AACF,QAAA,MACW,SAAS,8HACN,YAAY,yHACjB,KAAK,8HACF,UAAU,yHACZ,QAAQ,gIACL,WAAW,gIAC+B,CAAC;AAExD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,eAAe,GAChB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/render/queries.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
// import { store } from '../ui/state.js';
|
|
2
|
-
import { waitUntil } from '../waitFor.js';
|
|
3
|
-
let root = null;
|
|
4
|
-
export const setRoot = (rootInstance) => {
|
|
5
|
-
root = rootInstance;
|
|
6
|
-
};
|
|
7
|
-
const getRoot = () => {
|
|
8
|
-
const container = root;
|
|
9
|
-
if (!container) {
|
|
10
|
-
throw new Error('You need to render a component first!');
|
|
11
|
-
}
|
|
12
|
-
const ownerDocument = container.ownerDocument;
|
|
13
|
-
if (!ownerDocument) {
|
|
14
|
-
throw new Error('This feature is supported in React Native 0.82 and later!');
|
|
15
|
-
}
|
|
16
|
-
return ownerDocument.getRootNode();
|
|
17
|
-
};
|
|
18
|
-
const findNodeByPredicate = (predicate) => {
|
|
19
|
-
const queue = [getRoot()];
|
|
20
|
-
while (queue.length > 0) {
|
|
21
|
-
const node = queue.shift();
|
|
22
|
-
if (predicate(node)) {
|
|
23
|
-
return node;
|
|
24
|
-
}
|
|
25
|
-
for (const child of node.children) {
|
|
26
|
-
queue.push(child);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return null;
|
|
30
|
-
};
|
|
31
|
-
const findNodesByPredicate = (predicate) => {
|
|
32
|
-
const nodes = [];
|
|
33
|
-
const queue = [getRoot()];
|
|
34
|
-
while (queue.length > 0) {
|
|
35
|
-
const node = queue.shift();
|
|
36
|
-
if (predicate(node)) {
|
|
37
|
-
nodes.push(node);
|
|
38
|
-
}
|
|
39
|
-
for (const child of node.children) {
|
|
40
|
-
queue.push(child);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return nodes;
|
|
44
|
-
};
|
|
45
|
-
const getFiberOfHostInstance = (hostInstance) => {
|
|
46
|
-
// This should be considered as 'reaching into the implementation details' of React Native.
|
|
47
|
-
// Not perfect, but it's the only way to get the props of the host instance.
|
|
48
|
-
return (hostInstance
|
|
49
|
-
.__internalInstanceHandle || null);
|
|
50
|
-
};
|
|
51
|
-
const getPropsOfHostInstance = (hostInstance) => {
|
|
52
|
-
return getFiberOfHostInstance(hostInstance)?.memoizedProps || {};
|
|
53
|
-
};
|
|
54
|
-
const findBy = (predicate, options) => {
|
|
55
|
-
return waitUntil(() => findNodeByPredicate(predicate), options);
|
|
56
|
-
};
|
|
57
|
-
const findAllBy = (predicate, options) => {
|
|
58
|
-
return waitUntil(() => {
|
|
59
|
-
const nodes = findNodesByPredicate(predicate);
|
|
60
|
-
if (nodes.length === 0) {
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
return nodes;
|
|
64
|
-
}, options);
|
|
65
|
-
};
|
|
66
|
-
const queryBy = (predicate) => {
|
|
67
|
-
return findNodeByPredicate(predicate);
|
|
68
|
-
};
|
|
69
|
-
const queryAllBy = (predicate) => {
|
|
70
|
-
return findNodesByPredicate(predicate);
|
|
71
|
-
};
|
|
72
|
-
const getBy = (predicate) => {
|
|
73
|
-
const node = queryBy(predicate);
|
|
74
|
-
if (!node) {
|
|
75
|
-
throw new Error(`No node found with predicate ${predicate}`);
|
|
76
|
-
}
|
|
77
|
-
return node;
|
|
78
|
-
};
|
|
79
|
-
const getAllBy = (predicate) => {
|
|
80
|
-
const nodes = queryAllBy(predicate);
|
|
81
|
-
if (nodes.length === 0) {
|
|
82
|
-
throw new Error(`No nodes found with predicate ${predicate}`);
|
|
83
|
-
}
|
|
84
|
-
return nodes;
|
|
85
|
-
};
|
|
86
|
-
const createQueries = (predicate) => {
|
|
87
|
-
return {
|
|
88
|
-
findBy: (params) => findBy((node) => predicate(node, params)),
|
|
89
|
-
findAllBy: (params) => findAllBy((node) => predicate(node, params)),
|
|
90
|
-
queryBy: (params) => queryBy((node) => predicate(node, params)),
|
|
91
|
-
queryAllBy: (params) => queryAllBy((node) => predicate(node, params)),
|
|
92
|
-
getBy: (params) => getBy((node) => predicate(node, params)),
|
|
93
|
-
getAllBy: (params) => getAllBy((node) => predicate(node, params)),
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
const { queryBy: queryByTestId, queryAllBy: queryAllByTestId, getBy: getByTestId, getAllBy: getAllByTestId, findBy: findByTestId, findAllBy: findAllByTestId, } = createQueries((node, testId) => getPropsOfHostInstance(node).testID === testId);
|
|
97
|
-
const { queryBy: queryById, queryAllBy: queryAllById, getBy: getId, getAllBy: getAllById, findBy: findById, findAllBy: findAllById, } = createQueries((node, id) => node.id === id);
|
|
98
|
-
export { queryByTestId, queryAllByTestId, getByTestId, getAllByTestId, findByTestId, findAllByTestId, };
|
|
99
|
-
export { queryById, queryAllById, getId, getAllById, findById, findAllById };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { TestSuiteResult } from '@react-native-harness/bridge';
|
|
2
|
-
/**
|
|
3
|
-
* Runs tests from a specific module programmatically and returns the results.
|
|
4
|
-
*
|
|
5
|
-
* @param moduleId The require.resolveWeak call to the module, returning the module ID
|
|
6
|
-
* @returns The result of the test suite execution
|
|
7
|
-
*/
|
|
8
|
-
export declare const runHarnessTestsInModule: (loader: () => unknown) => Promise<TestSuiteResult>;
|
|
9
|
-
//# sourceMappingURL=runHarnessTestsInModule.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runHarnessTestsInModule.d.ts","sourceRoot":"","sources":["../src/runHarnessTestsInModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,8BAA8B,CAAC;AAoCtC;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,QAAQ,MAAM,OAAO,KACpB,OAAO,CAAC,eAAe,CAuBzB,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { collectTests } from './collector/functions.js';
|
|
2
|
-
import { runSuite } from './runner/runSuite.js';
|
|
3
|
-
import { getEmitter } from './utils/emitter.js';
|
|
4
|
-
const metroRequire = global.__r;
|
|
5
|
-
/**
|
|
6
|
-
* Patches the require function to clear the module cache for the first module that's going to be required after patching.
|
|
7
|
-
* @returns A function to unpatch the require function.
|
|
8
|
-
*/
|
|
9
|
-
const patchRequire = () => {
|
|
10
|
-
let wasRootModuleRequired = false;
|
|
11
|
-
global.__r = (moduleId) => {
|
|
12
|
-
if (!wasRootModuleRequired) {
|
|
13
|
-
// The first module that's going to be required after patching will be the module with tests.
|
|
14
|
-
// We need to clear the module cache for this module, so it ends up re-evaluated.
|
|
15
|
-
const module = metroRequire.getModules().get(moduleId);
|
|
16
|
-
if (module) {
|
|
17
|
-
module.hasError = false;
|
|
18
|
-
module.error = undefined;
|
|
19
|
-
module.isInitialized = false;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
wasRootModuleRequired = true;
|
|
23
|
-
return metroRequire(moduleId);
|
|
24
|
-
};
|
|
25
|
-
return () => {
|
|
26
|
-
global.__r = metroRequire;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Runs tests from a specific module programmatically and returns the results.
|
|
31
|
-
*
|
|
32
|
-
* @param moduleId The require.resolveWeak call to the module, returning the module ID
|
|
33
|
-
* @returns The result of the test suite execution
|
|
34
|
-
*/
|
|
35
|
-
export const runHarnessTestsInModule = async (loader) => {
|
|
36
|
-
// 1. Collect tests by executing the loader
|
|
37
|
-
// This expects the loader to call describe/it/test functions which register to the global collector
|
|
38
|
-
const { testSuite } = await collectTests(async () => {
|
|
39
|
-
const unpatchRequire = patchRequire();
|
|
40
|
-
try {
|
|
41
|
-
await loader();
|
|
42
|
-
}
|
|
43
|
-
finally {
|
|
44
|
-
unpatchRequire();
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
// 2. Prepare the runner context
|
|
48
|
-
// We use a local emitter as we are not reporting to the CLI bridge,
|
|
49
|
-
// but the runner internals expect an emitter.
|
|
50
|
-
const events = getEmitter();
|
|
51
|
-
const context = {
|
|
52
|
-
events,
|
|
53
|
-
testFilePath: 'unknown',
|
|
54
|
-
};
|
|
55
|
-
// 3. Run the collected suite
|
|
56
|
-
return runSuite(testSuite, context);
|
|
57
|
-
};
|
package/dist/screen/index.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { type ViewInfo } from '../NativeHarness.js';
|
|
2
|
-
/**
|
|
3
|
-
* Represents an element found on screen with its position and dimensions.
|
|
4
|
-
* This can be used with userEvent.tap() to interact with the element.
|
|
5
|
-
*/
|
|
6
|
-
export type ElementReference = ViewInfo;
|
|
7
|
-
export type Screen = {
|
|
8
|
-
/**
|
|
9
|
-
* Finds an element by its testID (accessibilityIdentifier on iOS, tag on Android).
|
|
10
|
-
* @throws Error if no element is found with the given testID.
|
|
11
|
-
*/
|
|
12
|
-
findByTestId: (testId: string) => ElementReference;
|
|
13
|
-
/**
|
|
14
|
-
* Finds all elements by testID (accessibilityIdentifier on iOS, tag on Android).
|
|
15
|
-
* @throws Error if no elements are found with the given testID.
|
|
16
|
-
*/
|
|
17
|
-
findAllByTestId: (testId: string) => ElementReference[];
|
|
18
|
-
/**
|
|
19
|
-
* Queries for an element by its testID without throwing.
|
|
20
|
-
* Returns null if no element is found.
|
|
21
|
-
*/
|
|
22
|
-
queryByTestId: (testId: string) => ElementReference | null;
|
|
23
|
-
/**
|
|
24
|
-
* Queries for all elements by testID without throwing.
|
|
25
|
-
* Returns an empty array if no elements are found.
|
|
26
|
-
*/
|
|
27
|
-
queryAllByTestId: (testId: string) => ElementReference[];
|
|
28
|
-
/**
|
|
29
|
-
* Finds an element by its accessibility label.
|
|
30
|
-
* @throws Error if no element is found with the given label.
|
|
31
|
-
*/
|
|
32
|
-
findByAccessibilityLabel: (label: string) => ElementReference;
|
|
33
|
-
/**
|
|
34
|
-
* Finds all elements by accessibility label.
|
|
35
|
-
* @throws Error if no elements are found with the given label.
|
|
36
|
-
*/
|
|
37
|
-
findAllByAccessibilityLabel: (label: string) => ElementReference[];
|
|
38
|
-
/**
|
|
39
|
-
* Queries for an element by its accessibility label without throwing.
|
|
40
|
-
* Returns null if no element is found.
|
|
41
|
-
*/
|
|
42
|
-
queryByAccessibilityLabel: (label: string) => ElementReference | null;
|
|
43
|
-
/**
|
|
44
|
-
* Queries for all elements by accessibility label without throwing.
|
|
45
|
-
* Returns an empty array if no elements are found.
|
|
46
|
-
*/
|
|
47
|
-
queryAllByAccessibilityLabel: (label: string) => ElementReference[];
|
|
48
|
-
};
|
|
49
|
-
export declare const screen: Screen;
|
|
50
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/screen/index.ts"],"names":[],"mappings":"AAAA,OAAsB,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAExC,MAAM,MAAM,MAAM,GAAG;IACnB;;;OAGG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,gBAAgB,CAAC;IAEnD;;;OAGG;IACH,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,gBAAgB,EAAE,CAAC;IAExD;;;OAGG;IACH,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,gBAAgB,GAAG,IAAI,CAAC;IAE3D;;;OAGG;IACH,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,gBAAgB,EAAE,CAAC;IAEzD;;;OAGG;IACH,wBAAwB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgB,CAAC;IAE9D;;;OAGG;IACH,2BAA2B,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgB,EAAE,CAAC;IAEnE;;;OAGG;IACH,yBAAyB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgB,GAAG,IAAI,CAAC;IAEtE;;;OAGG;IACH,4BAA4B,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgB,EAAE,CAAC;CACrE,CAAC;AA0DF,eAAO,MAAM,MAAM,QAAiB,CAAC"}
|
package/dist/screen/index.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import NativeHarness from '../NativeHarness.js';
|
|
2
|
-
const createScreen = () => {
|
|
3
|
-
return {
|
|
4
|
-
findByTestId: (testId) => {
|
|
5
|
-
const result = NativeHarness.queryByTestId(testId);
|
|
6
|
-
if (!result) {
|
|
7
|
-
throw new Error(`Unable to find element with testID: ${testId}`);
|
|
8
|
-
}
|
|
9
|
-
return result;
|
|
10
|
-
},
|
|
11
|
-
findAllByTestId: (testId) => {
|
|
12
|
-
const results = NativeHarness.queryAllByTestId(testId);
|
|
13
|
-
if (results.length === 0) {
|
|
14
|
-
throw new Error(`Unable to find any elements with testID: ${testId}`);
|
|
15
|
-
}
|
|
16
|
-
return results;
|
|
17
|
-
},
|
|
18
|
-
queryByTestId: (testId) => {
|
|
19
|
-
return NativeHarness.queryByTestId(testId);
|
|
20
|
-
},
|
|
21
|
-
queryAllByTestId: (testId) => {
|
|
22
|
-
return NativeHarness.queryAllByTestId(testId);
|
|
23
|
-
},
|
|
24
|
-
findByAccessibilityLabel: (label) => {
|
|
25
|
-
const result = NativeHarness.queryByAccessibilityLabel(label);
|
|
26
|
-
if (!result) {
|
|
27
|
-
throw new Error(`Unable to find element with accessibility label: ${label}`);
|
|
28
|
-
}
|
|
29
|
-
return result;
|
|
30
|
-
},
|
|
31
|
-
findAllByAccessibilityLabel: (label) => {
|
|
32
|
-
const results = NativeHarness.queryAllByAccessibilityLabel(label);
|
|
33
|
-
if (results.length === 0) {
|
|
34
|
-
throw new Error(`Unable to find any elements with accessibility label: ${label}`);
|
|
35
|
-
}
|
|
36
|
-
return results;
|
|
37
|
-
},
|
|
38
|
-
queryByAccessibilityLabel: (label) => {
|
|
39
|
-
return NativeHarness.queryByAccessibilityLabel(label);
|
|
40
|
-
},
|
|
41
|
-
queryAllByAccessibilityLabel: (label) => {
|
|
42
|
-
return NativeHarness.queryAllByAccessibilityLabel(label);
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export const screen = createScreen();
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ElementReference } from '../screen/index.js';
|
|
2
|
-
export type UserEvent = {
|
|
3
|
-
/**
|
|
4
|
-
* Simulates a tap on the given element.
|
|
5
|
-
* The tap occurs at the center of the element's bounds.
|
|
6
|
-
* Returns a promise that resolves when the tap is complete.
|
|
7
|
-
*/
|
|
8
|
-
tap: (element: ElementReference) => Promise<void>;
|
|
9
|
-
/**
|
|
10
|
-
* Simulates a tap at the specified screen coordinates.
|
|
11
|
-
* Returns a promise that resolves when the tap is complete.
|
|
12
|
-
*/
|
|
13
|
-
tapAt: (x: number, y: number) => Promise<void>;
|
|
14
|
-
};
|
|
15
|
-
export declare const userEvent: UserEvent;
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/userEvent/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAe3D,MAAM,MAAM,SAAS,GAAG;IACtB;;;;OAIG;IACH,GAAG,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD;;;OAGG;IACH,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD,CAAC;AAqBF,eAAO,MAAM,SAAS,WAAoB,CAAC"}
|
package/dist/userEvent/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import NativeHarness from '../NativeHarness.js';
|
|
2
|
-
/**
|
|
3
|
-
* Flushes pending events on the JS event loop.
|
|
4
|
-
* This ensures that any events triggered by native code (like onPress callbacks)
|
|
5
|
-
* are processed before we continue.
|
|
6
|
-
*/
|
|
7
|
-
const flushEvents = () => {
|
|
8
|
-
return new Promise((resolve) => {
|
|
9
|
-
// setImmediate runs after I/O events but before timers
|
|
10
|
-
// This allows touch event callbacks to be processed first
|
|
11
|
-
setImmediate(resolve);
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
const createUserEvent = () => {
|
|
15
|
-
return {
|
|
16
|
-
tap: async (element) => {
|
|
17
|
-
// Calculate center point of the element
|
|
18
|
-
const centerX = element.x + element.width / 2;
|
|
19
|
-
const centerY = element.y + element.height / 2;
|
|
20
|
-
await NativeHarness.simulateTap(centerX, centerY);
|
|
21
|
-
// Flush pending events to ensure onPress and other callbacks are processed
|
|
22
|
-
await flushEvents();
|
|
23
|
-
},
|
|
24
|
-
tapAt: async (x, y) => {
|
|
25
|
-
await NativeHarness.simulateTap(x, y);
|
|
26
|
-
// Flush pending events to ensure onPress and other callbacks are processed
|
|
27
|
-
await flushEvents();
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export const userEvent = createUserEvent();
|
package/dist/utils/hmr.d.ts
DELETED
package/dist/utils/hmr.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hmr.d.ts","sourceRoot":"","sources":["../../src/utils/hmr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAAO,IAE7B,CAAC"}
|
package/dist/utils/hmr.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type StackFrame = {
|
|
2
|
-
column: number | null | undefined;
|
|
3
|
-
file: string | null | undefined;
|
|
4
|
-
lineNumber: number | null | undefined;
|
|
5
|
-
methodName: string;
|
|
6
|
-
};
|
|
7
|
-
declare const parseErrorStack: (errorStack?: string) => StackFrame[];
|
|
8
|
-
export default parseErrorStack;
|
|
9
|
-
//# sourceMappingURL=parse-error-stack.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-error-stack.d.ts","sourceRoot":"","sources":["../../src/utils/parse-error-stack.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAkDF,QAAA,MAAM,eAAe,GAAI,aAAa,MAAM,KAAG,UAAU,EAcxD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
const parseStackLine = (line) => {
|
|
2
|
-
const trimmed = line.trim();
|
|
3
|
-
if (!trimmed.startsWith('at ')) {
|
|
4
|
-
return null;
|
|
5
|
-
}
|
|
6
|
-
const withoutAt = trimmed.slice(3);
|
|
7
|
-
// Examples handled:
|
|
8
|
-
// "at foo (http://host:8081/index.bundle?platform=ios:12:34)"
|
|
9
|
-
// "at http://host:8081/index.bundle?platform=ios:12:34"
|
|
10
|
-
// "at foo@http://host:8081/index.bundle?platform=ios:12:34"
|
|
11
|
-
const matchParen = /^(.+?)\s+\((.+):(\d+):(\d+)\)$/.exec(withoutAt);
|
|
12
|
-
if (matchParen) {
|
|
13
|
-
const [, methodName, file, lineNumber, column] = matchParen;
|
|
14
|
-
return {
|
|
15
|
-
methodName: methodName || '<anonymous>',
|
|
16
|
-
file,
|
|
17
|
-
lineNumber: Number(lineNumber),
|
|
18
|
-
column: Number(column),
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
const matchAt = /^(.+?)@(.+):(\d+):(\d+)$/.exec(withoutAt);
|
|
22
|
-
if (matchAt) {
|
|
23
|
-
const [, methodName, file, lineNumber, column] = matchAt;
|
|
24
|
-
return {
|
|
25
|
-
methodName: methodName || '<anonymous>',
|
|
26
|
-
file,
|
|
27
|
-
lineNumber: Number(lineNumber),
|
|
28
|
-
column: Number(column),
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
const matchBare = /^(.+):(\d+):(\d+)$/.exec(withoutAt);
|
|
32
|
-
if (matchBare) {
|
|
33
|
-
const [, file, lineNumber, column] = matchBare;
|
|
34
|
-
return {
|
|
35
|
-
methodName: '<anonymous>',
|
|
36
|
-
file,
|
|
37
|
-
lineNumber: Number(lineNumber),
|
|
38
|
-
column: Number(column),
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
return null;
|
|
42
|
-
};
|
|
43
|
-
const parseErrorStack = (errorStack) => {
|
|
44
|
-
if (!errorStack) {
|
|
45
|
-
return [];
|
|
46
|
-
}
|
|
47
|
-
const frames = [];
|
|
48
|
-
for (const line of errorStack.split('\n')) {
|
|
49
|
-
const frame = parseStackLine(line);
|
|
50
|
-
if (frame) {
|
|
51
|
-
frames.push(frame);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return frames;
|
|
55
|
-
};
|
|
56
|
-
export default parseErrorStack;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collector.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/collector.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-handling.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/error-handling.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expect.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/expect.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initialize.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/initialize.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spy.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/spy.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../../src/bundler/bundle.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,WAAW,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,CAUlE,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class ModuleNotFoundError extends Error {
|
|
2
|
-
readonly modulePath: string;
|
|
3
|
-
constructor(modulePath: string);
|
|
4
|
-
}
|
|
5
|
-
export declare class MalformedModuleError extends Error {
|
|
6
|
-
readonly modulePath: string;
|
|
7
|
-
readonly reason: string;
|
|
8
|
-
constructor(modulePath: string, reason: string);
|
|
9
|
-
}
|
|
10
|
-
export declare class BundlingFailedError extends Error {
|
|
11
|
-
readonly modulePath: string;
|
|
12
|
-
readonly reason: string;
|
|
13
|
-
constructor(modulePath: string, reason: string);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/bundler/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,mBAAoB,SAAQ,KAAK;aAChB,UAAU,EAAE,MAAM;gBAAlB,UAAU,EAAE,MAAM;CAI/C;AAED,qBAAa,oBAAqB,SAAQ,KAAK;aAE3B,UAAU,EAAE,MAAM;aAClB,MAAM,EAAE,MAAM;gBADd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM;CAKjC;AAED,qBAAa,mBAAoB,SAAQ,KAAK;aAE1B,UAAU,EAAE,MAAM;aAClB,MAAM,EAAE,MAAM;gBADd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM;CAMjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../../src/bundler/evaluate.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,YAAY,MAAM,KAAG,IAsBrE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/bundler/factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,eAAO,MAAM,UAAU,QAAO,OAoC7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bundler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BundlerEvents } from '@react-native-harness/bridge';
|
|
2
|
-
import { EventEmitter } from '../utils/emitter.js';
|
|
3
|
-
export type Bundler = {
|
|
4
|
-
events: EventEmitter<BundlerEvents>;
|
|
5
|
-
getModule: (filePath: string) => Promise<string>;
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/bundler/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IACpC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAClD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/client/factory.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,SAAS,2EAsFrB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type DeviceDescriptor = {
|
|
2
|
-
platform: 'ios' | 'android' | 'vega' | 'web';
|
|
3
|
-
manufacturer: string;
|
|
4
|
-
model: string;
|
|
5
|
-
osVersion: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const getDeviceDescriptor: () => DeviceDescriptor;
|
|
8
|
-
//# sourceMappingURL=getDeviceDescriptor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDeviceDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/client/getDeviceDescriptor.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAO,gBAwCtC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getWSServer.d.ts","sourceRoot":"","sources":["../../../../src/client/getWSServer.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,QAAO,MAM9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '../utils/emitter.js';
|
|
2
|
-
import { Bundler } from '../bundler/index.js';
|
|
3
|
-
import { BundlerEvents } from '@react-native-harness/bridge';
|
|
4
|
-
export type RunSetupFilesOptions = {
|
|
5
|
-
setupFiles: string[];
|
|
6
|
-
setupFilesAfterEnv: string[];
|
|
7
|
-
events: EventEmitter<BundlerEvents>;
|
|
8
|
-
bundler: Bundler;
|
|
9
|
-
evaluateModule: (moduleJs: string, filePath: string) => void;
|
|
10
|
-
};
|
|
11
|
-
export declare const runSetupFiles: ({ setupFiles, setupFilesAfterEnv, events, bundler, evaluateModule, }: RunSetupFilesOptions) => Promise<void>;
|
|
12
|
-
//# sourceMappingURL=setup-files.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup-files.d.ts","sourceRoot":"","sources":["../../../../src/client/setup-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,MAAM,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,sEAMjC,oBAAoB,kBA8DtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/client/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAIxE,eAAO,MAAM,SAAS,GAAI,QAAQ,YAAY,KAAG,IAEhD,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,YAOpC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type TestErrorCode = 'CONTEXT_NOT_INITIALIZED' | 'OUTSIDE_DESCRIBE_BLOCK' | 'INVALID_TEST_NAME' | 'DUPLICATE_TEST_NAME' | 'INVALID_FUNCTION';
|
|
2
|
-
export declare class TestError extends Error {
|
|
3
|
-
code: TestErrorCode;
|
|
4
|
-
functionName: string;
|
|
5
|
-
context?: Record<string, unknown> | undefined;
|
|
6
|
-
constructor(code: TestErrorCode, functionName: string, context?: Record<string, unknown> | undefined);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/collector/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACrB,yBAAyB,GACzB,wBAAwB,GACxB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB,qBAAa,SAAU,SAAQ,KAAK;IAEzB,IAAI,EAAE,aAAa;IACnB,YAAY,EAAE,MAAM;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjC,IAAI,EAAE,aAAa,EACnB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAe3C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/collector/factory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,gBAAgB,QAAO,aA0BnC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { CollectionResult } from '@react-native-harness/bridge';
|
|
2
|
-
import type { TestFn } from './types.js';
|
|
3
|
-
export declare const describe: ((name: string, fn: () => void) => void) & {
|
|
4
|
-
skip: (name: string, fn: () => void) => void;
|
|
5
|
-
only: (name: string, fn: () => void) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare const test: ((name: string, fn: TestFn) => void) & {
|
|
8
|
-
skip: (name: string, fn: TestFn) => void;
|
|
9
|
-
only: (name: string, fn: TestFn) => void;
|
|
10
|
-
todo: (name: string) => void;
|
|
11
|
-
};
|
|
12
|
-
export declare const it: ((name: string, fn: TestFn) => void) & {
|
|
13
|
-
skip: (name: string, fn: TestFn) => void;
|
|
14
|
-
only: (name: string, fn: TestFn) => void;
|
|
15
|
-
todo: (name: string) => void;
|
|
16
|
-
};
|
|
17
|
-
export declare function beforeAll(fn: TestFn): void;
|
|
18
|
-
export declare function afterAll(fn: TestFn): void;
|
|
19
|
-
export declare function beforeEach(fn: TestFn): void;
|
|
20
|
-
export declare function afterEach(fn: TestFn): void;
|
|
21
|
-
export declare const collectTests: (fn: () => void | Promise<void>) => Promise<CollectionResult>;
|
|
22
|
-
//# sourceMappingURL=functions.d.ts.map
|