twd-js 1.2.2 → 1.3.0-beta.0
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/bundled.d.ts +9 -0
- package/dist/bundled.es.js +46257 -0
- package/dist/bundled.umd.js +311 -0
- package/dist/index.cjs.js +25 -25
- package/dist/index.d.ts +6 -2
- package/dist/index.es.js +638 -623
- package/dist/jsx-runtime-CjngqUuo.js +6 -0
- package/dist/{jsx-runtime-CtyxV31n.mjs → jsx-runtime-DqUUEvWR.mjs} +125 -127
- package/dist/mock-sw.js +2 -2
- package/dist/runner-ci.cjs.js +1 -1
- package/dist/runner-ci.es.js +22 -33
- package/dist/runner.cjs.js +1 -1
- package/dist/runner.es.js +43 -33
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/package.json +14 -9
- package/dist/_commonjsHelpers-C6fGbg64.mjs +0 -6
- package/dist/_commonjsHelpers-DwGv2jUC.js +0 -1
- package/dist/jsx-runtime-DN5DOl8k.js +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -243,16 +243,20 @@ declare interface TWDAPI {
|
|
|
243
243
|
/**
|
|
244
244
|
* Wait for a mocked request to be made.
|
|
245
245
|
* @param alias The alias of the mock rule to wait for
|
|
246
|
+
* @param retries The number of retries to make
|
|
247
|
+
* @param retryDelay The delay between retries
|
|
246
248
|
* @return The matched rule (with body if applicable)
|
|
247
249
|
*
|
|
248
250
|
* @example
|
|
249
251
|
* ```ts
|
|
250
252
|
* const rule = await twd.waitFor("aliasId");
|
|
251
253
|
* console.log(rule.body);
|
|
254
|
+
* const rule = await twd.waitFor("aliasId", 5, 100);
|
|
255
|
+
* console.log(rule.body);
|
|
252
256
|
*
|
|
253
257
|
* ```
|
|
254
258
|
*/
|
|
255
|
-
waitForRequest: (alias: string) => Promise<Rule>;
|
|
259
|
+
waitForRequest: (alias: string, retries?: number, retryDelay?: number) => Promise<Rule>;
|
|
256
260
|
/**
|
|
257
261
|
* wait for a list of mocked requests to be made.
|
|
258
262
|
* @param aliases The aliases of the mock rules to wait for
|
|
@@ -424,7 +428,7 @@ declare type URLAssertionName = "eq" | "contain.url";
|
|
|
424
428
|
|
|
425
429
|
declare type URLCommandAPI = {
|
|
426
430
|
location: Location;
|
|
427
|
-
should: (name: AnyURLAssertion, value: string) =>
|
|
431
|
+
should: (name: AnyURLAssertion, value: string, retries?: number) => Promise<string>;
|
|
428
432
|
};
|
|
429
433
|
|
|
430
434
|
declare type UserEvent = typeof default_2;
|