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

@web/test-runner-chrome

Package Overview
Dependencies
Maintainers
6
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.4.0 to 0.4.1

6

CHANGELOG.md
# @web/test-runner-chrome
## 0.4.1
### Patch Changes
- 45a2f21: add ability to run HTML tests
## 0.4.0

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

17

dist/chromeLauncher.js

@@ -5,5 +5,3 @@ "use strict";

const puppeteer_core_1 = require("puppeteer-core");
const test_runner_core_1 = require("@web/test-runner-core");
const findExecutablePath_1 = require("./findExecutablePath");
const { PARAM_SESSION_ID, PARAM_DEBUG } = test_runner_core_1.constants;
function chromeLauncher({ executablePath: customExecutablePath, puppeteer, args, } = {}) {

@@ -13,7 +11,4 @@ const executablePath = customExecutablePath !== null && customExecutablePath !== void 0 ? customExecutablePath : findExecutablePath_1.findExecutablePath();

const inactivePages = [];
let config;
let serverAddress;
let browser;
let debugBrowser = undefined;
const createUrl = (session) => `${serverAddress}?${PARAM_SESSION_ID}=${session.id}`;
function launchBrowser(options = {}) {

@@ -28,6 +23,4 @@ if (puppeteer) {

return {
async start(_config) {
config = _config;
async start() {
browser = await launchBrowser();
serverAddress = `${config.address}:${config.port}/`;
return ['Chrome'];

@@ -43,3 +36,3 @@ },

},
async startSession(session) {
async startSession(session, url) {
if (!browser.isConnected()) {

@@ -56,3 +49,3 @@ throw new Error('Browser is closed');

activePages.set(session.id, page);
await page.goto(createUrl(session));
await page.goto(url);
},

@@ -66,3 +59,3 @@ stopSession(session) {

},
async startDebugSession(session) {
async startDebugSession(session, url) {
if (debugBrowser === null || debugBrowser === void 0 ? void 0 : debugBrowser.isConnected()) {

@@ -73,3 +66,3 @@ await debugBrowser.close();

const page = await debugBrowser.newPage();
await page.goto(`${createUrl(session)}&${PARAM_DEBUG}=true`);
await page.goto(url);
},

@@ -76,0 +69,0 @@ };

{
"name": "@web/test-runner-chrome",
"version": "0.4.0",
"version": "0.4.1",
"publishConfig": {

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

"devDependencies": {
"@web/test-runner-mocha": "^0.2.0",
"@web/test-runner-server": "^0.4.1"
"@web/test-runner-mocha": "^0.2.1",
"@web/test-runner-server": "^0.4.2"
}
}

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