@memlab/core 1.1.3 → 1.1.4

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.
@@ -89,6 +89,7 @@ export declare type CLIArgs = {
89
89
  export declare type Cookies = Array<{
90
90
  name: string;
91
91
  value: string;
92
+ domain?: string;
92
93
  }>;
93
94
  /** @internal */
94
95
  export interface IE2EScenarioSynthesizer {
@@ -359,7 +360,11 @@ export interface IScenario {
359
360
  * a list of `<name, value, domain>` tuples.
360
361
  *
361
362
  * **Note**: please make sure that you provide the correct `domain` field for
362
- * the cookies tuples.
363
+ * the cookies tuples. If no `domain` field is specified, memlab will try
364
+ * to fill in a domain based on the `url` callback.
365
+ * For example, when the `domain` field is absent,
366
+ * memlab will auto fill in `.facebook.com` as domain base
367
+ * on the initial page load's url: `https://www.facebook.com/`.
363
368
  *
364
369
  * @returns cookie list
365
370
  * * **Examples**:
@@ -374,6 +379,8 @@ export interface IScenario {
374
379
  * // ...
375
380
  * ],
376
381
  * };
382
+ *
383
+ * module.exports = scenario;
377
384
  * ```
378
385
  */
379
386
  cookies?: () => Cookies;
@@ -386,6 +393,8 @@ export interface IScenario {
386
393
  * const scenario = {
387
394
  * url: () => 'https://www.npmjs.com/',
388
395
  * };
396
+ *
397
+ * module.exports = scenario;
389
398
  * ```
390
399
  * If a test scenario only specifies the `url` callback (without the `action`
391
400
  * callback), memlab will try to detect memory leaks from the initial page
@@ -414,6 +423,8 @@ export interface IScenario {
414
423
  * await page.click('a[href="/back"]');
415
424
  * },
416
425
  * }
426
+ *
427
+ * module.exports = scenario;
417
428
  * ```
418
429
  * Note: always clean up external puppeteer references to JS objects
419
430
  * in the browser context.
@@ -431,6 +442,8 @@ export interface IScenario {
431
442
  * },
432
443
  * back: async (page) => ... ,
433
444
  * }
445
+ *
446
+ * module.exports = scenario;
434
447
  ```
435
448
  */
436
449
  action?: InteractionsCallback;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memlab/core",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "license": "MIT",
5
5
  "description": "memlab core libraries",
6
6
  "author": "Liang Gong <lgong@fb.com>",