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.cjs.js +39 -44
- package/dist/index.d.ts +4 -10
- package/dist/index.es.js +4540 -4813
- package/dist/jsx-runtime-CtyxV31n.mjs +276 -0
- package/dist/jsx-runtime-DN5DOl8k.js +6 -0
- package/dist/mock-sw.js +1 -1
- package/dist/ui.cjs.js +1 -0
- package/dist/ui.d.ts +10 -0
- package/dist/ui.es.js +11 -0
- package/package.json +6 -1
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
|
-
*
|
|
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
|
*
|