fix: export request from index.jsm (#13158)
This commit is contained in:
parent
a8d4a8aa52
commit
c200321402
|
|
@ -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]);
|
||||||
|
|
|
||||||
|
|
@ -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]);
|
||||||
|
|
|
||||||
|
|
@ -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]);
|
||||||
|
|
|
||||||
|
|
@ -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]);
|
||||||
|
|
|
||||||
|
|
@ -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]);
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue