Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@web/test-runner-playwright

Package Overview
Dependencies
Maintainers
6
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web/test-runner-playwright - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

8

CHANGELOG.md
# @web/test-runner-playwright
## 0.4.2
### Patch Changes
- 5ab18d8: feat(test-runner-core): batch v8 test coverage
- Updated dependencies [5ab18d8]
- @web/test-runner-core@0.6.4
## 0.4.1

@@ -4,0 +12,0 @@

27

dist/playwrightLauncher.js

@@ -10,2 +10,7 @@ "use strict";

const validBrowserTypes = ['chromium', 'firefox', 'webkit'];
async function getPageCoverage(config, testFiles, page) {
var _a, _b;
const coverage = ((_b = (await ((_a = page.coverage) === null || _a === void 0 ? void 0 : _a.stopJSCoverage()))) !== null && _b !== void 0 ? _b : []);
return test_runner_coverage_v8_1.v8ToIstanbul(config, testFiles, coverage);
}
function playwrightLauncher({ browserTypes = ['chromium'], } = {}) {

@@ -58,2 +63,5 @@ const browsers = new Map();

page = await browser.newPage();
if (config.coverage) {
await ((_a = page.coverage) === null || _a === void 0 ? void 0 : _a.startJSCoverage());
}
}

@@ -64,5 +72,2 @@ else {

activePages.set(session.id, page);
if (config.coverage) {
await ((_a = page.coverage) === null || _a === void 0 ? void 0 : _a.startJSCoverage());
}
await page.goto(url);

@@ -77,16 +82,4 @@ },

},
async getTestCoverage(session) {
var _a, _b;
const page = activePages.get(session.id);
if (!page) {
throw new Error(`No page for session ${session.id}`);
}
let istanbulCoverage = undefined;
if (config.coverage) {
const coverage = ((_b = (await ((_a = page.coverage) === null || _a === void 0 ? void 0 : _a.stopJSCoverage()))) !== null && _b !== void 0 ? _b : []);
istanbulCoverage = await test_runner_coverage_v8_1.v8ToIstanbul(config, testFiles, coverage);
}
activePages.delete(session.id);
inactivePages.push(page);
return istanbulCoverage;
getTestCoverage() {
return Promise.all(inactivePages.map(page => getPageCoverage(config, testFiles, page)));
},

@@ -93,0 +86,0 @@ async startDebugSession(session, url) {

{
"name": "@web/test-runner-playwright",
"version": "0.4.1",
"version": "0.4.2",
"publishConfig": {

@@ -39,3 +39,3 @@ "access": "public"

"dependencies": {
"@web/test-runner-core": "^0.6.2",
"@web/test-runner-core": "^0.6.4",
"@web/test-runner-coverage-v8": "^0.0.1",

@@ -46,4 +46,4 @@ "playwright": "^1.2.0"

"@web/test-runner-mocha": "^0.2.5",
"@web/test-runner-server": "^0.5.6"
"@web/test-runner-server": "^0.5.7"
}
}

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc