@apitree.cz/testing-library 0.1.0-next.b32cc41 → 0.1.0-next.ffe75af
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.
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RenderHookOptions, RenderOptions } from '@testing-library/react';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
export interface CreateRenderersProps {
|
|
4
4
|
defaultWrapper?: RenderOptions['wrapper'] | undefined;
|
|
5
5
|
}
|
|
6
6
|
export declare const createRenderers: ({ defaultWrapper, }?: CreateRenderersProps) => {
|
|
7
|
-
render:
|
|
8
|
-
renderHook: <Result, Props
|
|
7
|
+
render: (ui: ReactElement, options?: RenderOptions) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries.js"), HTMLElement, HTMLElement>;
|
|
8
|
+
renderHook: <Result, Props>(render: (initialProps: Props) => Result, options?: RenderHookOptions<Props, typeof import("@testing-library/dom/types/queries.js"), HTMLElement, HTMLElement> | undefined) => import("@testing-library/react").RenderHookResult<Result, Props>;
|
|
9
9
|
};
|
|
10
|
+
export { queries } from '@testing-library/dom';
|
|
10
11
|
export * from '@testing-library/react';
|
|
11
12
|
export * from '@testing-library/user-event';
|
package/dist/testing-library.js
CHANGED
|
@@ -8,13 +8,11 @@ export const createRenderers = ({ defaultWrapper = function defaultWrapper({ chi
|
|
|
8
8
|
};
|
|
9
9
|
const customRenderHook = (render, options) => {
|
|
10
10
|
const { wrapper = defaultWrapper } = options ?? {};
|
|
11
|
-
return renderHook(render, {
|
|
12
|
-
...options,
|
|
13
|
-
wrapper,
|
|
14
|
-
});
|
|
11
|
+
return renderHook(render, { ...options, wrapper });
|
|
15
12
|
};
|
|
16
13
|
return { render: customRender, renderHook: customRenderHook };
|
|
17
14
|
};
|
|
15
|
+
export { queries } from '@testing-library/dom';
|
|
18
16
|
export * from '@testing-library/react';
|
|
19
17
|
export * from '@testing-library/user-event';
|
|
20
18
|
//# sourceMappingURL=testing-library.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing-library.js","sourceRoot":"","sources":["../src/testing-library.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testing-library.js","sourceRoot":"","sources":["../src/testing-library.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAU5D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,cAAc,GAAG,SAAS,cAAc,CAAC,EAAE,QAAQ,EAAE;IACnD,OAAO,QAAQ,CAAC;AAClB,CAAC,MACuB,EAAE,EAAE,EAAE;IAC9B,MAAM,YAAY,GAAG,CAAC,EAAgB,EAAE,OAAuB,EAAE,EAAE;QACjE,MAAM,EAAE,OAAO,GAAG,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;QACnD,OAAO,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;IACF,MAAM,gBAAgB,GAAG,CACvB,MAAuC,EACvC,OAAkC,EAClC,EAAE;QACF,MAAM,EAAE,OAAO,GAAG,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;QACnD,OAAO,UAAU,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC;AAChE,CAAC,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apitree.cz/testing-library",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.ffe75af",
|
|
4
4
|
"description": "React Testing Library setup for Vitest in ApiTree projects.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"react": "^18.2.0",
|
|
31
31
|
"react-dom": "^18.2.0",
|
|
32
32
|
"vitest": "^0.34.6",
|
|
33
|
-
"@apitree.cz/vitest-config": "0.1.0-next.
|
|
33
|
+
"@apitree.cz/vitest-config": "0.1.0-next.ffe75af"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^18.2.0",
|