twd-js 1.2.0 → 1.2.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/index.d.ts CHANGED
@@ -73,13 +73,6 @@ export declare const initTests: (testModules: TestModule, Component: React.React
73
73
  render: (el: React.ReactNode) => void;
74
74
  }) => Promise<void>;
75
75
 
76
- export declare function MockedComponent<TProps extends Record<string, any>>({ name, children, }: MockedComponentProps<TProps>): JSX.Element;
77
-
78
- declare interface MockedComponentProps<TProps = any> {
79
- name: string;
80
- children: React.ReactElement<TProps>;
81
- }
82
-
83
76
  /**
84
77
  * Negatable assertion names (e.g., 'not.have.text').
85
78
  */
@@ -283,15 +276,16 @@ declare interface TWDAPI {
283
276
  url: () => URLCommandAPI;
284
277
  /**
285
278
  * Initializes request mocking (registers the service worker).
286
- * Must be called before using `twd.mockRequest()`.
279
+ * @param [path] service worker absolute path (optional)
287
280
  *
288
281
  * @example
289
282
  * ```ts
290
283
  * await twd.initRequestMocking();
291
- *
284
+ * // init with custom service worker path
285
+ * await twd.initRequestMocking('/test-path/mock-sw.js');
292
286
  * ```
293
287
  */
294
- initRequestMocking: () => Promise<void>;
288
+ initRequestMocking: (path?: string) => Promise<void>;
295
289
  /**
296
290
  * Clears all request mock rules.
297
291
  *