@augment-vir/test 31.57.4 → 31.57.5

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.
@@ -3,12 +3,18 @@ import { type Download, type Page } from '@playwright/test';
3
3
  import { type RequireExactlyOne } from 'type-fest';
4
4
  import { type UniversalTestContext } from '../augments/universal-testing-suite/universal-test-context.js';
5
5
  /**
6
- * Run the trigger and catch a new page _or_ a new download (sometimes Playwright inconsistently
7
- * chooses on or the other).
6
+ * Output from {@link handleNewPageOrDownload}.
8
7
  *
9
8
  * @category Internal
10
9
  */
11
- export declare function handleNewPageOrDownload(testContext: Readonly<UniversalTestContext>, trigger: () => MaybePromise<void>): Promise<RequireExactlyOne<{
10
+ export type HandleNewPageOrDownloadResult = RequireExactlyOne<{
12
11
  newPage: Page;
13
12
  download: Download;
14
- }>>;
13
+ }>;
14
+ /**
15
+ * Run the trigger and catch a new page _or_ a new download (sometimes Playwright inconsistently
16
+ * chooses on or the other).
17
+ *
18
+ * @category Internal
19
+ */
20
+ export declare function handleNewPageOrDownload(testContext: Readonly<UniversalTestContext>, trigger: () => MaybePromise<void>): Promise<HandleNewPageOrDownloadResult>;
@@ -12,12 +12,12 @@ export async function handleNewPageOrDownload(testContext, trigger) {
12
12
  .context()
13
13
  .waitForEvent('page')
14
14
  .then((result) => {
15
- return { page: result };
15
+ return { newPage: result };
16
16
  }),
17
17
  testContext.page.waitForEvent('download').then((result) => {
18
18
  return { download: result };
19
19
  }),
20
20
  ]);
21
21
  await trigger();
22
- return (await openOrDownload);
22
+ return await openOrDownload;
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/test",
3
- "version": "31.57.4",
3
+ "version": "31.57.5",
4
4
  "description": "A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner.",
5
5
  "keywords": [
6
6
  "test",
@@ -44,8 +44,8 @@
44
44
  "test:web": "virmator test --no-deps web 'src/test-web/**/*.test.ts' 'src/augments/universal-testing-suite/**/*.test.ts'"
45
45
  },
46
46
  "dependencies": {
47
- "@augment-vir/assert": "^31.57.4",
48
- "@augment-vir/common": "^31.57.4",
47
+ "@augment-vir/assert": "^31.57.5",
48
+ "@augment-vir/common": "^31.57.5",
49
49
  "@date-vir/duration": "^8.1.0",
50
50
  "@virmator/test": "^14.3.5",
51
51
  "type-fest": "^5.3.1"