Socket
Socket
Sign inDemoInstall

@web/test-runner-playwright

Package Overview
Dependencies
159
Maintainers
7
Versions
84
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.2 to 0.5.3

6

CHANGELOG.md
# @web/test-runner-playwright
## 0.5.3
### Patch Changes
- 22c85b5: fix handle race condition when starting browser
## 0.5.2

@@ -4,0 +10,0 @@

1

dist/PlaywrightLauncher.d.ts

@@ -23,2 +23,3 @@ import playwright, { Browser, Page, LaunchOptions } from 'playwright';

private testCoveragePerSession;
private __launchBrowserPromise?;
constructor(product: ProductType, launchOptions: LaunchOptions, createPageFunction?: CreatePageFunction | undefined);

@@ -25,0 +26,0 @@ start(config: TestRunnerCoreConfig, testFiles: string[]): Promise<void>;

@@ -88,4 +88,9 @@ "use strict";

var _a;
if (this.__launchBrowserPromise) {
return this.__launchBrowserPromise;
}
if (!this.browser || !((_a = this.browser) === null || _a === void 0 ? void 0 : _a.isConnected())) {
this.browser = await playwright_1.default[this.product].launch(this.launchOptions);
this.__launchBrowserPromise = playwright_1.default[this.product].launch(this.launchOptions);
this.browser = await this.__launchBrowserPromise;
this.__launchBrowserPromise = undefined;
}

@@ -92,0 +97,0 @@ return this.browser;

2

package.json
{
"name": "@web/test-runner-playwright",
"version": "0.5.2",
"version": "0.5.3",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

@@ -27,2 +27,3 @@ import playwright, { Browser, Page, LaunchOptions } from 'playwright';

private testCoveragePerSession = new Map<string, CoverageMapData>();
private __launchBrowserPromise?: Promise<Browser>;

@@ -112,4 +113,10 @@ constructor(

private async getOrStartBrowser(): Promise<Browser> {
if (this.__launchBrowserPromise) {
return this.__launchBrowserPromise;
}
if (!this.browser || !this.browser?.isConnected()) {
this.browser = await playwright[this.product].launch(this.launchOptions);
this.__launchBrowserPromise = playwright[this.product].launch(this.launchOptions);
this.browser = await this.__launchBrowserPromise;
this.__launchBrowserPromise = undefined;
}

@@ -116,0 +123,0 @@ return this.browser;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc