@apitree.cz/testing-library 0.1.0-next.05dd9cd → 0.1.0-next.2bf4a89

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,12 +1,11 @@
1
- import type { RenderHookOptions, RenderOptions } from '@testing-library/react';
1
+ import type { Queries, RenderHookOptions, RenderOptions, queries } 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: (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>;
7
+ render: <Q extends Queries = typeof queries, Container extends Element | DocumentFragment = HTMLElement, BaseElement extends Element | DocumentFragment = Container>(ui: ReactElement, options?: RenderOptions<Q, Container, BaseElement> | undefined) => import("@testing-library/react").RenderResult<Q, Container, BaseElement>;
8
+ renderHook: <Result, Props, Q_1 extends Queries = typeof queries, Container_1 extends Element | DocumentFragment = HTMLElement, BaseElement_1 extends Element | DocumentFragment = Container_1>(render: (initialProps: Props) => Result, options?: RenderHookOptions<Props, Q_1, Container_1, BaseElement_1> | undefined) => import("@testing-library/react").RenderHookResult<Result, Props>;
9
9
  };
10
- export { queries } from '@testing-library/dom';
11
10
  export * from '@testing-library/react';
12
11
  export * from '@testing-library/user-event';
@@ -8,11 +8,13 @@ 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, { ...options, wrapper });
11
+ return renderHook(render, {
12
+ ...options,
13
+ wrapper,
14
+ });
12
15
  };
13
16
  return { render: customRender, renderHook: customRenderHook };
14
17
  };
15
- export { queries } from '@testing-library/dom';
16
18
  export * from '@testing-library/react';
17
19
  export * from '@testing-library/user-event';
18
20
  //# sourceMappingURL=testing-library.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"testing-library.js","sourceRoot":"","sources":["../src/testing-library.ts"],"names":[],"mappings":"AAMA,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,CAKnB,EAAgB,EAChB,OAAkD,EAClD,EAAE;QACF,MAAM,EAAE,OAAO,GAAG,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;QACnD,OAAO,MAAM,CAA4B,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC,CAAC;IACF,MAAM,gBAAgB,GAAG,CAOvB,MAAuC,EACvC,OAA6D,EAC7D,EAAE;QACF,MAAM,EAAE,OAAO,GAAG,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;QACnD,OAAO,UAAU,CAA2C,MAAM,EAAE;YAClE,GAAG,OAAO;YACV,OAAO;SACR,CAAC,CAAC;IACL,CAAC,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC;AAChE,CAAC,CAAC;AAEF,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.05dd9cd",
3
+ "version": "0.1.0-next.2bf4a89",
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.05dd9cd"
33
+ "@apitree.cz/vitest-config": "0.1.0-next.2bf4a89"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "^18.2.0",