mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(test-runner): throw error if no port and url is given (#20497)
https://github.com/microsoft/playwright/issues/20476
This commit is contained in:
parent
f72d400952
commit
01790c0e19
@ -210,7 +210,7 @@ export const webServerPluginsForConfig = (config: FullConfigInternal): TestRunne
|
||||
const shouldSetBaseUrl = !!config.webServer;
|
||||
const webServerPlugins = [];
|
||||
for (const webServerConfig of config._webServers) {
|
||||
if (webServerConfig.port !== undefined && webServerConfig.url !== undefined)
|
||||
if ((!webServerConfig.port && !webServerConfig.url) || (webServerConfig.port && webServerConfig.url))
|
||||
throw new Error(`Exactly one of 'port' or 'url' is required in config.webServer.`);
|
||||
|
||||
const url = webServerConfig.url || `http://localhost:${webServerConfig.port}`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user