fix: export request from index.jsm (#13158)

This commit is contained in:
Yury Semikhatsky 2022-03-30 09:35:47 -07:00 committed by GitHub
parent a8d4a8aa52
commit c200321402
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 11 deletions

View file

@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
import { chromium, firefox, webkit, selectors, devices, errors } from 'playwright-chromium'; import { chromium, firefox, webkit, selectors, devices, errors, request } from 'playwright-chromium';
import playwright from 'playwright-chromium'; import playwright from 'playwright-chromium';
import testESM from './esm.mjs'; import testESM from './esm.mjs';
testESM({ chromium, firefox, webkit, selectors, devices, errors, playwright }, [chromium]); testESM({ chromium, firefox, webkit, selectors, devices, errors, request, playwright }, [chromium]);

View file

@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
import { chromium, firefox, webkit, selectors, devices, errors } from 'playwright-firefox'; import { chromium, firefox, webkit, selectors, devices, errors, request } from 'playwright-firefox';
import playwright from 'playwright-firefox'; import playwright from 'playwright-firefox';
import testESM from './esm.mjs'; import testESM from './esm.mjs';
testESM({ chromium, firefox, webkit, selectors, devices, errors, playwright }, [firefox]); testESM({ chromium, firefox, webkit, selectors, devices, errors, request, playwright }, [firefox]);

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { chromium, firefox, webkit, selectors, devices, errors, test, expect } from '@playwright/test'; import { chromium, firefox, webkit, selectors, devices, errors, request, test, expect } from '@playwright/test';
import * as playwright from '@playwright/test'; import * as playwright from '@playwright/test';
import defaultExport from '@playwright/test'; import defaultExport from '@playwright/test';
import testESM from './esm.mjs'; import testESM from './esm.mjs';
@ -35,4 +35,4 @@ if (typeof expect !== 'function') {
} }
expect(1).toBe(1); expect(1).toBe(1);
testESM({ chromium, firefox, webkit, selectors, devices, errors, playwright }, [chromium, firefox, webkit]); testESM({ chromium, firefox, webkit, selectors, devices, errors, request, playwright }, [chromium, firefox, webkit]);

View file

@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
import { chromium, firefox, webkit, selectors, devices, errors } from 'playwright-webkit'; import { chromium, firefox, webkit, selectors, devices, errors, request } from 'playwright-webkit';
import playwright from 'playwright-webkit'; import playwright from 'playwright-webkit';
import testESM from './esm.mjs'; import testESM from './esm.mjs';
testESM({ chromium, firefox, webkit, selectors, devices, errors, playwright }, [webkit]); testESM({ chromium, firefox, webkit, selectors, devices, errors, request, playwright }, [webkit]);

View file

@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
import { chromium, firefox, webkit, selectors, devices, errors } from 'playwright'; import { chromium, firefox, webkit, selectors, devices, errors, request } from 'playwright';
import playwright from 'playwright'; import playwright from 'playwright';
import testESM from './esm.mjs'; import testESM from './esm.mjs';
testESM({ chromium, firefox, webkit, selectors, devices, errors, playwright }, [chromium, firefox, webkit]); testESM({ chromium, firefox, webkit, selectors, devices, errors, request, playwright }, [chromium, firefox, webkit]);

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
export default async function testESM({ chromium, firefox, webkit, selectors, devices, errors, playwright }, browsers) { export default async function testESM({ chromium, firefox, webkit, selectors, devices, errors, request, playwright }, browsers) {
if (playwright.chromium !== chromium) if (playwright.chromium !== chromium)
process.exit(1); process.exit(1);
if (playwright.firefox !== firefox) if (playwright.firefox !== firefox)
@ -23,6 +23,8 @@ export default async function testESM({ chromium, firefox, webkit, selectors, de
process.exit(1); process.exit(1);
if (playwright.errors !== errors) if (playwright.errors !== errors)
process.exit(1); process.exit(1);
if (playwright.request !== request)
process.exit(1);
try { try {
for (const browserType of browsers) { for (const browserType of browsers) {

View file

@ -22,6 +22,7 @@ export const webkit = playwright.webkit;
export const selectors = playwright.selectors; export const selectors = playwright.selectors;
export const devices = playwright.devices; export const devices = playwright.devices;
export const errors = playwright.errors; export const errors = playwright.errors;
export const request = playwright.request;
export const _electron = playwright._electron; export const _electron = playwright._electron;
export const _android = playwright._android; export const _android = playwright._android;
export default playwright; export default playwright;

View file

@ -21,6 +21,7 @@ export const webkit = playwright.webkit;
export const selectors = playwright.selectors; export const selectors = playwright.selectors;
export const devices = playwright.devices; export const devices = playwright.devices;
export const errors = playwright.errors; export const errors = playwright.errors;
export const request = playwright.request;
export const _electron = playwright._electron; export const _electron = playwright._electron;
export const _android = playwright._android; export const _android = playwright._android;
export const test = playwright.test; export const test = playwright.test;