@react-native-harness/runtime 1.0.0-canary.1761733411323 → 1.0.0-canary.1764675030942
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/client/store.d.ts +4 -0
- package/dist/client/store.d.ts.map +1 -0
- package/dist/client/store.js +10 -0
- package/dist/expect/expect.d.ts +9 -0
- package/dist/expect/expect.d.ts.map +1 -0
- package/dist/expect/expect.js +77 -0
- package/dist/expect/matchers/toMatchImageSnapshot.d.ts +12 -0
- package/dist/expect/matchers/toMatchImageSnapshot.d.ts.map +1 -0
- package/dist/expect/matchers/toMatchImageSnapshot.js +11 -0
- package/dist/render/queries.d.ts +7 -0
- package/dist/render/queries.d.ts.map +1 -0
- package/dist/render/queries.js +99 -0
- package/dist/runner/context.d.ts +10 -0
- package/dist/runner/context.d.ts.map +1 -0
- package/dist/runner/context.js +6 -0
- package/dist/screen/index.d.ts +8 -0
- package/dist/screen/index.d.ts.map +1 -0
- package/dist/screen/index.js +18 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/ui/state.d.ts +2 -2
- package/dist/userEvent/index.d.ts +6 -0
- package/dist/userEvent/index.d.ts.map +1 -0
- package/dist/userEvent/index.js +10 -0
- package/out-tsc/vitest/src/bundler/bundle.d.ts.map +1 -1
- package/out-tsc/vitest/src/bundler/evaluate.d.ts.map +1 -1
- package/out-tsc/vitest/src/client/factory.d.ts.map +1 -1
- package/out-tsc/vitest/src/client/setup-files.d.ts +12 -0
- package/out-tsc/vitest/src/client/setup-files.d.ts.map +1 -0
- package/out-tsc/vitest/src/client/store.d.ts +4 -0
- package/out-tsc/vitest/src/client/store.d.ts.map +1 -0
- package/out-tsc/vitest/src/collector/functions.d.ts +1 -1
- package/out-tsc/vitest/src/collector/functions.d.ts.map +1 -1
- package/out-tsc/vitest/src/collector/types.d.ts +1 -1
- package/out-tsc/vitest/src/collector/types.d.ts.map +1 -1
- package/out-tsc/vitest/src/constants.d.ts +0 -1
- package/out-tsc/vitest/src/constants.d.ts.map +1 -1
- package/out-tsc/vitest/src/expect/index.d.ts +5 -0
- package/out-tsc/vitest/src/expect/index.d.ts.map +1 -1
- package/out-tsc/vitest/src/expect/matchers/toMatchImageSnapshot.d.ts +7 -0
- package/out-tsc/vitest/src/expect/matchers/toMatchImageSnapshot.d.ts.map +1 -0
- package/out-tsc/vitest/src/index.d.ts +4 -0
- package/out-tsc/vitest/src/index.d.ts.map +1 -1
- package/out-tsc/vitest/src/jest-mock.d.ts +2 -0
- package/out-tsc/vitest/src/jest-mock.d.ts.map +1 -0
- package/out-tsc/vitest/src/render/ErrorBoundary.d.ts +17 -0
- package/out-tsc/vitest/src/render/ErrorBoundary.d.ts.map +1 -0
- package/out-tsc/vitest/src/render/TestComponentOverlay.d.ts +3 -0
- package/out-tsc/vitest/src/render/TestComponentOverlay.d.ts.map +1 -0
- package/out-tsc/vitest/src/render/cleanup.d.ts +2 -0
- package/out-tsc/vitest/src/render/cleanup.d.ts.map +1 -0
- package/out-tsc/vitest/src/render/index.d.ts +6 -0
- package/out-tsc/vitest/src/render/index.d.ts.map +1 -0
- package/out-tsc/vitest/src/render/setup.d.ts +2 -0
- package/out-tsc/vitest/src/render/setup.d.ts.map +1 -0
- package/out-tsc/vitest/src/render/types.d.ts +12 -0
- package/out-tsc/vitest/src/render/types.d.ts.map +1 -0
- package/out-tsc/vitest/src/runner/factory.d.ts.map +1 -1
- package/out-tsc/vitest/src/screen/index.d.ts +8 -0
- package/out-tsc/vitest/src/screen/index.d.ts.map +1 -0
- package/out-tsc/vitest/src/ui/ReadyScreen.d.ts.map +1 -1
- package/out-tsc/vitest/src/ui/WrongEnvironmentScreen.d.ts.map +1 -1
- package/out-tsc/vitest/src/ui/state.d.ts +13 -0
- package/out-tsc/vitest/src/ui/state.d.ts.map +1 -1
- package/out-tsc/vitest/src/userEvent/index.d.ts +6 -0
- package/out-tsc/vitest/src/userEvent/index.d.ts.map +1 -0
- package/out-tsc/vitest/tsconfig.spec.tsbuildinfo +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ErrorBoundaryProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
};
|
|
5
|
+
type ErrorBoundaryState = {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
error: Error | null;
|
|
8
|
+
};
|
|
9
|
+
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
10
|
+
constructor(props: ErrorBoundaryProps);
|
|
11
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
12
|
+
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
13
|
+
componentDidUpdate(prevProps: ErrorBoundaryProps): void;
|
|
14
|
+
render(): React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/render/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAChD,kBAAkB,EAClB,kBAAkB,CACnB;gBACa,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAIxD,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI;IAIjE,kBAAkB,CAAC,SAAS,EAAE,kBAAkB,GAAG,IAAI;IAOvD,MAAM,IAAI,KAAK,CAAC,SAAS;CAwBnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestComponentOverlay.d.ts","sourceRoot":"","sources":["../../../../src/render/TestComponentOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAMzC,eAAO,MAAM,oBAAoB,QAAO,KAAK,CAAC,YAAY,GAAG,IAgC5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup.d.ts","sourceRoot":"","sources":["../../../../src/render/cleanup.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,QAAO,IAI1B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { RenderResult, RenderOptions } from './types.js';
|
|
3
|
+
export declare const render: (element: React.ReactElement, options?: RenderOptions) => Promise<RenderResult>;
|
|
4
|
+
export { cleanup } from './cleanup.js';
|
|
5
|
+
export type { RenderResult, RenderOptions } from './types.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/render/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAY9D,eAAO,MAAM,MAAM,GACjB,SAAS,KAAK,CAAC,YAAY,EAC3B,UAAS,aAAkB,KAC1B,OAAO,CAAC,YAAY,CA2EtB,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../../src/render/setup.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,YAIjB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type RenderResult = {
|
|
3
|
+
rerender: (element: React.ReactElement) => Promise<void>;
|
|
4
|
+
unmount: () => void;
|
|
5
|
+
};
|
|
6
|
+
export type RenderOptions = {
|
|
7
|
+
timeout?: number;
|
|
8
|
+
wrapper?: React.ComponentType<{
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/render/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAC,CAAC;CAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/runner/factory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,aAAa,QAAO,
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/runner/factory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,aAAa,QAAO,UAsBhC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ElementReference, FileReference } from '@react-native-harness/bridge';
|
|
2
|
+
export type Screen = {
|
|
3
|
+
findByTestId: (testId: string) => Promise<ElementReference>;
|
|
4
|
+
findAllByTestId: (testId: string) => Promise<ElementReference[]>;
|
|
5
|
+
screenshot: (name?: string) => Promise<FileReference>;
|
|
6
|
+
};
|
|
7
|
+
export declare const screen: Screen;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screen/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACd,MAAM,8BAA8B,CAAC;AAGtC,MAAM,MAAM,MAAM,GAAG;IACnB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC5D,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACjE,UAAU,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;CACvD,CAAC;AAmBF,eAAO,MAAM,MAAM,QAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadyScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/ReadyScreen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReadyScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/ReadyScreen.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,WAAW,+CAgCvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WrongEnvironmentScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/WrongEnvironmentScreen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WrongEnvironmentScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/WrongEnvironmentScreen.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,+CAiBlC,CAAC"}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
export type RunnerState = {
|
|
2
3
|
status: 'loading' | 'idle' | 'running';
|
|
3
4
|
setStatus: (status: 'loading' | 'idle' | 'running') => void;
|
|
5
|
+
renderedElement: React.ReactElement | null;
|
|
6
|
+
setRenderedElement: (element: React.ReactElement | null) => void;
|
|
7
|
+
updateRenderedElement: (element: React.ReactElement) => void;
|
|
8
|
+
renderKey: string | null;
|
|
9
|
+
onLayoutCallback: (() => void) | null;
|
|
10
|
+
setOnLayoutCallback: (callback: (() => void) | null) => void;
|
|
11
|
+
onRenderCallback: (() => void) | null;
|
|
12
|
+
setOnRenderCallback: (callback: (() => void) | null) => void;
|
|
4
13
|
};
|
|
5
14
|
export declare const store: import("zustand/react").UseBoundStore<import("zustand/vanilla").StoreApi<RunnerState>>;
|
|
6
15
|
export declare const useRunnerStatus: () => "idle" | "loading" | "running";
|
|
16
|
+
export declare const useRenderedElement: () => {
|
|
17
|
+
element: React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
|
|
18
|
+
key: string | null;
|
|
19
|
+
};
|
|
7
20
|
//# sourceMappingURL=state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/ui/state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/ui/state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,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