Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: override host platform with env variable (#33434)
Yury Semikhatsky36a975c30b12
diff --git a/packages/playwright-core/src/utils/hostPlatform.ts b/packages/playwright-core/src/utils/hostPlatform.tsindex 9664418e3d..7d81f39da3 100644--- a/packages/playwright-core/src/utils/hostPlatform.ts+++ b/packages/playwright-core/src/utils/hostPlatform.ts@@ -35,6 +35,12 @@ export type HostPlatform = 'win64' |'<unknown>';function calculatePlatform(): { hostPlatform: HostPlatform, isOfficiallySupportedPlatform: boolean } {+ if (process.env.PLAYWRIGHT_HOST_PLATFORM_OVERRIDE) {+ return {+ hostPlatform: process.env.PLAYWRIGHT_HOST_PLATFORM_OVERRIDE as HostPlatform,+ isOfficiallySupportedPlatform: false+ };+ }const platform = os.platform();if (platform === 'darwin') {const ver = os.release().split('.').map((a: string) => parseInt(a, 10));