Socket
Socket
Sign inDemoInstall

@web/test-runner-core

Package Overview
Dependencies
Maintainers
6
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.6.6 to 0.6.7

6

CHANGELOG.md
# @web/test-runner-core
## 0.6.7
### Patch Changes
- c72ea22: allow configuring browser launch options
## 0.6.6

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

2

dist/browser-launcher/BrowserLauncher.d.ts

@@ -14,3 +14,3 @@ import { CoverageMapData } from 'istanbul-lib-coverage';

*/
start(config: TestRunnerCoreConfig, testFiles: string[]): Promise<string[]>;
start(config: TestRunnerCoreConfig, testFiles: string[]): Promise<string>;
/**

@@ -17,0 +17,0 @@ * One time teardown for the browser launcher. Called when the test runner

import { TestSession } from '../test-session/TestSession';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
export declare function createTestSessions(browserNamesPerLauncher: Map<BrowserLauncher, string[]>, testFiles: string[]): TestSession[];
export declare function createTestSessions(browserNameForLauncher: Map<BrowserLauncher, string>, testFiles: string[]): TestSession[];
//# sourceMappingURL=createTestSessions.d.ts.map

@@ -6,21 +6,19 @@ "use strict";

const TestSessionStatus_1 = require("../test-session/TestSessionStatus");
function createTestSessions(browserNamesPerLauncher, testFiles) {
function createTestSessions(browserNameForLauncher, testFiles) {
const sessions = [];
for (const testFile of testFiles) {
for (const [browserLauncher, browserNames] of browserNamesPerLauncher) {
for (const browserName of browserNames) {
const session = {
id: uuid_1.v4(),
testRun: -1,
browserName,
browserLauncher,
status: TestSessionStatus_1.SESSION_STATUS.SCHEDULED,
testFile,
errors: [],
tests: [],
logs: [],
request404s: [],
};
sessions.push(session);
}
for (const [browserLauncher, browserName] of browserNameForLauncher) {
const session = {
id: uuid_1.v4(),
testRun: -1,
browserName,
browserLauncher,
status: TestSessionStatus_1.SESSION_STATUS.SCHEDULED,
testFile,
errors: [],
tests: [],
logs: [],
request404s: [],
};
sessions.push(session);
}

@@ -27,0 +25,0 @@ }

@@ -42,16 +42,8 @@ "use strict";

this.startTime = Date.now();
const browserNamesPerLauncher = new Map();
const browserNameForLauncher = new Map();
this.browserNames = [];
for (const launcher of this.browserLaunchers) {
const names = await launcher.start(this.config, this.testFiles);
if (!Array.isArray(names) || names.length === 0 || names.some(n => typeof n !== 'string')) {
throw new Error('Browser start must return an array of strings.');
}
for (const name of names) {
if (this.browserNames.includes(name)) {
throw new Error(`Multiple browser launchers return the same browser name ${name}`);
}
this.browserNames.push(name);
}
browserNamesPerLauncher.set(launcher, names);
const name = await launcher.start(this.config, this.testFiles);
this.browserNames.push(name);
browserNameForLauncher.set(launcher, name);
}

@@ -62,3 +54,3 @@ this.favoriteBrowser = (_a = this.browserNames.find(browserName => {

})) !== null && _a !== void 0 ? _a : this.browserNames[0];
const createdSessions = createTestSessions_1.createTestSessions(browserNamesPerLauncher, this.testFiles);
const createdSessions = createTestSessions_1.createTestSessions(browserNameForLauncher, this.testFiles);
for (const session of createdSessions) {

@@ -65,0 +57,0 @@ this.sessions.add(session);

{
"name": "@web/test-runner-core",
"version": "0.6.6",
"version": "0.6.7",
"publishConfig": {

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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