mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
fix(fetch): skip tests on non-default modes, add node-fetch to deps list (#8425)
This commit is contained in:
parent
a6740c852a
commit
33852635b7
@ -72,6 +72,7 @@ const DEPENDENCIES = [
|
||||
'https-proxy-agent',
|
||||
'jpeg-js',
|
||||
'mime',
|
||||
'node-fetch',
|
||||
'pngjs',
|
||||
'progress',
|
||||
'proper-lockfile',
|
||||
@ -140,8 +141,11 @@ if (!args.some(arg => arg === '--no-cleanup')) {
|
||||
const pwInternalJSON = require(path.join(ROOT_PATH, 'package.json'));
|
||||
const depNames = packageName === 'playwright-test' ? Object.keys(pwInternalJSON.dependencies) : DEPENDENCIES;
|
||||
const dependencies = {};
|
||||
for (const dep of depNames)
|
||||
dependencies[dep] = pwInternalJSON.dependencies[dep];
|
||||
for (const dep of depNames) {
|
||||
if (!pwInternalJSON.dependencies[dep])
|
||||
throw new Error(`Dependecy ${dep} was removed from package.json, but not build_package.js`);
|
||||
dependencies[dep] = pwInternalJSON.dependencies[dep];
|
||||
}
|
||||
await writeToPackage('package.json', JSON.stringify({
|
||||
name: package.name || packageName,
|
||||
version: pwInternalJSON.version,
|
||||
|
@ -17,6 +17,8 @@
|
||||
import http from 'http';
|
||||
import { contextTest as it, expect } from './config/browserTest';
|
||||
|
||||
it.skip(({ mode }) => mode !== 'default');
|
||||
|
||||
let prevAgent: http.Agent;
|
||||
it.beforeAll(() => {
|
||||
prevAgent = http.globalAgent;
|
||||
|
Loading…
Reference in New Issue
Block a user