Socket
Socket
Sign inDemoInstall

@web/test-runner-core

Package Overview
Dependencies
Maintainers
7
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.13.0 to 0.13.1

2

browser/session.d.ts

@@ -1,2 +0,2 @@

import { TestSession, TestResultError, TestSuiteResult, TestResult } from '../dist/index';
import { TestSession, TestResultError, TestSuiteResult, TestResult } from '../dist/index.js';

@@ -3,0 +3,0 @@ export interface RuntimeConfig {

@@ -1,2 +0,2 @@

import { EventEmitter } from '../../utils/EventEmitter';
import { EventEmitter } from '../../utils/EventEmitter.js';
interface EventMap {

@@ -3,0 +3,0 @@ input: string;

@@ -9,6 +9,6 @@ "use strict";

const cli_cursor_1 = __importDefault(require("cli-cursor"));
const BufferedConsole_1 = require("./BufferedConsole");
const EventEmitter_1 = require("../../utils/EventEmitter");
const BufferedConsole_js_1 = require("./BufferedConsole.js");
const EventEmitter_js_1 = require("../../utils/EventEmitter.js");
const CLEAR_COMMAND = process.platform === 'win32' ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H';
class DynamicTerminal extends EventEmitter_1.EventEmitter {
class DynamicTerminal extends EventEmitter_js_1.EventEmitter {
constructor() {

@@ -19,3 +19,3 @@ super(...arguments);

this.started = false;
this.bufferedConsole = new BufferedConsole_1.BufferedConsole();
this.bufferedConsole = new BufferedConsole_js_1.BufferedConsole();
this.pendingConsoleFlush = false;

@@ -22,0 +22,0 @@ this.isInteractive = process.stdout.isTTY;

@@ -1,3 +0,3 @@

import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestRunner } from '../runner/TestRunner';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { TestRunner } from '../runner/TestRunner.js';
export type MenuType = 'none' | 'overview' | 'focus' | 'debug' | 'manual-debug';

@@ -4,0 +4,0 @@ export declare const MENUS: {

@@ -11,9 +11,9 @@ "use strict";

const open_1 = __importDefault(require("open"));
const writeCoverageReport_1 = require("./writeCoverageReport");
const getSelectFilesMenu_1 = require("./getSelectFilesMenu");
const getWatchCommands_1 = require("./getWatchCommands");
const DynamicTerminal_1 = require("./terminal/DynamicTerminal");
const BufferedLogger_1 = require("./BufferedLogger");
const getManualDebugMenu_1 = require("./getManualDebugMenu");
const TestSessionStatus_1 = require("../test-session/TestSessionStatus");
const writeCoverageReport_js_1 = require("./writeCoverageReport.js");
const getSelectFilesMenu_js_1 = require("./getSelectFilesMenu.js");
const getWatchCommands_js_1 = require("./getWatchCommands.js");
const DynamicTerminal_js_1 = require("./terminal/DynamicTerminal.js");
const BufferedLogger_js_1 = require("./BufferedLogger.js");
const getManualDebugMenu_js_1 = require("./getManualDebugMenu.js");
const TestSessionStatus_js_1 = require("../test-session/TestSessionStatus.js");
exports.MENUS = {

@@ -34,3 +34,3 @@ NONE: 'none',

constructor(config, runner) {
this.terminal = new DynamicTerminal_1.DynamicTerminal();
this.terminal = new DynamicTerminal_js_1.DynamicTerminal();
this.reportedFilesByTestRun = new Map();

@@ -148,3 +148,3 @@ this.activeMenu = exports.MENUS.NONE;

}
if (session.status === TestSessionStatus_1.SESSION_STATUS.FINISHED) {
if (session.status === TestSessionStatus_js_1.SESSION_STATUS.FINISHED) {
this.reportTestResult(session.testFile);

@@ -219,3 +219,3 @@ this.reportTestProgress();

const sessionsForTestFile = Array.from(this.sessions.forTestFile(testFile));
const allFinished = sessionsForTestFile.every(s => s.status === TestSessionStatus_1.SESSION_STATUS.FINISHED);
const allFinished = sessionsForTestFile.every(s => s.status === TestSessionStatus_js_1.SESSION_STATUS.FINISHED);
if (!allFinished) {

@@ -235,3 +235,3 @@ // not all sessions for this file are finished

reportedFiles.add(testFile);
const bufferedLogger = new BufferedLogger_1.BufferedLogger(this.logger);
const bufferedLogger = new BufferedLogger_js_1.BufferedLogger(this.logger);
for (const reporter of this.config.reporters) {

@@ -282,3 +282,3 @@ const sessionsForTestFile = Array.from(this.sessions.forTestFile(testFile));

}
reports.push(...(0, getWatchCommands_1.getWatchCommands)(!!this.config.coverage, this.runner.testFiles, !!this.runner.focusedTestFile), '');
reports.push(...(0, getWatchCommands_js_1.getWatchCommands)(!!this.config.coverage, this.runner.testFiles, !!this.runner.focusedTestFile), '');
}

@@ -316,3 +316,3 @@ if (logStatic) {

writeCoverageReport(testCoverage) {
(0, writeCoverageReport_1.writeCoverageReport)(testCoverage, this.config.coverageConfig);
(0, writeCoverageReport_js_1.writeCoverageReport)(testCoverage, this.config.coverageConfig);
}

@@ -351,3 +351,3 @@ switchMenu(menu) {

const sessions = Array.from(this.sessions.forTestFile(testFile));
if (sessions.every(t => t.status === TestSessionStatus_1.SESSION_STATUS.FINISHED && !t.passed)) {
if (sessions.every(t => t.status === TestSessionStatus_js_1.SESSION_STATUS.FINISHED && !t.passed)) {
this.menuFailedFiles.push(testFile);

@@ -359,3 +359,3 @@ }

}
const selectFilesEntries = (0, getSelectFilesMenu_1.getSelectFilesMenu)(this.menuSucceededAndPendingFiles, this.menuFailedFiles);
const selectFilesEntries = (0, getSelectFilesMenu_js_1.getSelectFilesMenu)(this.menuSucceededAndPendingFiles, this.menuFailedFiles);
this.terminal.logDynamic([]);

@@ -367,3 +367,3 @@ this.terminal.logStatic(selectFilesEntries);

logManualDebugMenu() {
this.terminal.logDynamic((0, getManualDebugMenu_1.getManualDebugMenu)(this.config));
this.terminal.logDynamic((0, getManualDebugMenu_js_1.getManualDebugMenu)(this.config));
}

@@ -370,0 +370,0 @@ async reportEnd() {

import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestRunnerCoreConfig } from './TestRunnerCoreConfig';
import { TestRunnerCoreConfig } from './TestRunnerCoreConfig.js';
export interface TestRunnerGroupConfig {

@@ -4,0 +4,0 @@ name: string;

export { CoverageMapData } from 'istanbul-lib-coverage';
import * as constants from './utils/constants';
import * as constants from './utils/constants.js';
export { constants };
export { BrowserLauncher, SessionResult } from './browser-launcher/BrowserLauncher';
export { Reporter, ReportTestResultsArgs, GetTestProgressArgs, ReporterArgs, TestRunArgs, TestRunStartedArgs, TestRunFinishedArgs, } from './reporter/Reporter';
export { TestRunner } from './runner/TestRunner';
export { TestRunnerCli } from './cli/TestRunnerCli';
export { BufferedLogger } from './cli/BufferedLogger';
export { TestRunnerPlugin } from './server/TestRunnerPlugin';
export { TestFramework } from './test-framework/TestFramework';
export { TestRunnerCoreConfig, CoverageConfig, CoverageThresholdConfig, } from './config/TestRunnerCoreConfig';
export { TestRunnerGroupConfig } from './config/TestRunnerGroupConfig';
export { TestCoverage } from './coverage/getTestCoverage';
export { Logger, ErrorWithLocation } from './logger/Logger';
export { TestSession, TestResultError, TestResult, TestSuiteResult, } from './test-session/TestSession';
export { DebugTestSession } from './test-session/DebugTestSession';
export { BasicTestSession } from './test-session/BasicTestSession';
export { TestSessionManager } from './test-session/TestSessionManager';
export { TestSessionStatus, SESSION_STATUS } from './test-session/TestSessionStatus';
export { EventEmitter } from './utils/EventEmitter';
export { isTestFilePath } from './utils/isTestFilePath';
export { fetchSourceMap } from './utils/fetchSourceMap';
export { BrowserLauncher, SessionResult } from './browser-launcher/BrowserLauncher.js';
export { Reporter, ReportTestResultsArgs, GetTestProgressArgs, ReporterArgs, TestRunArgs, TestRunStartedArgs, TestRunFinishedArgs, } from './reporter/Reporter.js';
export { TestRunner } from './runner/TestRunner.js';
export { TestRunnerCli } from './cli/TestRunnerCli.js';
export { BufferedLogger } from './cli/BufferedLogger.js';
export { TestRunnerPlugin } from './server/TestRunnerPlugin.js';
export { TestFramework } from './test-framework/TestFramework.js';
export { TestRunnerCoreConfig, CoverageConfig, CoverageThresholdConfig, } from './config/TestRunnerCoreConfig.js';
export { TestRunnerGroupConfig } from './config/TestRunnerGroupConfig.js';
export { TestCoverage } from './coverage/getTestCoverage.js';
export { Logger, ErrorWithLocation } from './logger/Logger.js';
export { TestSession, TestResultError, TestResult, TestSuiteResult, } from './test-session/TestSession.js';
export { DebugTestSession } from './test-session/DebugTestSession.js';
export { BasicTestSession } from './test-session/BasicTestSession.js';
export { TestSessionManager } from './test-session/TestSessionManager.js';
export { TestSessionStatus, SESSION_STATUS } from './test-session/TestSessionStatus.js';
export { EventEmitter } from './utils/EventEmitter.js';
export { isTestFilePath } from './utils/isTestFilePath.js';
export { fetchSourceMap } from './utils/fetchSourceMap.js';
//# sourceMappingURL=index.d.ts.map

@@ -27,20 +27,20 @@ "use strict";

exports.fetchSourceMap = exports.isTestFilePath = exports.EventEmitter = exports.SESSION_STATUS = exports.TestSessionManager = exports.BufferedLogger = exports.TestRunnerCli = exports.TestRunner = exports.constants = void 0;
const constants = __importStar(require("./utils/constants"));
const constants = __importStar(require("./utils/constants.js"));
exports.constants = constants;
var TestRunner_1 = require("./runner/TestRunner");
Object.defineProperty(exports, "TestRunner", { enumerable: true, get: function () { return TestRunner_1.TestRunner; } });
var TestRunnerCli_1 = require("./cli/TestRunnerCli");
Object.defineProperty(exports, "TestRunnerCli", { enumerable: true, get: function () { return TestRunnerCli_1.TestRunnerCli; } });
var BufferedLogger_1 = require("./cli/BufferedLogger");
Object.defineProperty(exports, "BufferedLogger", { enumerable: true, get: function () { return BufferedLogger_1.BufferedLogger; } });
var TestSessionManager_1 = require("./test-session/TestSessionManager");
Object.defineProperty(exports, "TestSessionManager", { enumerable: true, get: function () { return TestSessionManager_1.TestSessionManager; } });
var TestSessionStatus_1 = require("./test-session/TestSessionStatus");
Object.defineProperty(exports, "SESSION_STATUS", { enumerable: true, get: function () { return TestSessionStatus_1.SESSION_STATUS; } });
var EventEmitter_1 = require("./utils/EventEmitter");
Object.defineProperty(exports, "EventEmitter", { enumerable: true, get: function () { return EventEmitter_1.EventEmitter; } });
var isTestFilePath_1 = require("./utils/isTestFilePath");
Object.defineProperty(exports, "isTestFilePath", { enumerable: true, get: function () { return isTestFilePath_1.isTestFilePath; } });
var fetchSourceMap_1 = require("./utils/fetchSourceMap");
Object.defineProperty(exports, "fetchSourceMap", { enumerable: true, get: function () { return fetchSourceMap_1.fetchSourceMap; } });
var TestRunner_js_1 = require("./runner/TestRunner.js");
Object.defineProperty(exports, "TestRunner", { enumerable: true, get: function () { return TestRunner_js_1.TestRunner; } });
var TestRunnerCli_js_1 = require("./cli/TestRunnerCli.js");
Object.defineProperty(exports, "TestRunnerCli", { enumerable: true, get: function () { return TestRunnerCli_js_1.TestRunnerCli; } });
var BufferedLogger_js_1 = require("./cli/BufferedLogger.js");
Object.defineProperty(exports, "BufferedLogger", { enumerable: true, get: function () { return BufferedLogger_js_1.BufferedLogger; } });
var TestSessionManager_js_1 = require("./test-session/TestSessionManager.js");
Object.defineProperty(exports, "TestSessionManager", { enumerable: true, get: function () { return TestSessionManager_js_1.TestSessionManager; } });
var TestSessionStatus_js_1 = require("./test-session/TestSessionStatus.js");
Object.defineProperty(exports, "SESSION_STATUS", { enumerable: true, get: function () { return TestSessionStatus_js_1.SESSION_STATUS; } });
var EventEmitter_js_1 = require("./utils/EventEmitter.js");
Object.defineProperty(exports, "EventEmitter", { enumerable: true, get: function () { return EventEmitter_js_1.EventEmitter; } });
var isTestFilePath_js_1 = require("./utils/isTestFilePath.js");
Object.defineProperty(exports, "isTestFilePath", { enumerable: true, get: function () { return isTestFilePath_js_1.isTestFilePath; } });
var fetchSourceMap_js_1 = require("./utils/fetchSourceMap.js");
Object.defineProperty(exports, "fetchSourceMap", { enumerable: true, get: function () { return fetchSourceMap_js_1.fetchSourceMap; } });
//# sourceMappingURL=index.js.map

@@ -1,6 +0,6 @@

import { TestSession } from '../test-session/TestSession';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestRunnerGroupConfig } from '../config/TestRunnerGroupConfig';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestSessionGroup } from '../test-session/TestSessionGroup';
import { TestSession } from '../test-session/TestSession.js';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { TestRunnerGroupConfig } from '../config/TestRunnerGroupConfig.js';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher.js';
import { TestSessionGroup } from '../test-session/TestSessionGroup.js';
export declare function createTestSessions(config: TestRunnerCoreConfig, groupConfigs: TestRunnerGroupConfig[]): {

@@ -7,0 +7,0 @@ sessionGroups: TestSessionGroup[];

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

const path_1 = __importDefault(require("path"));
const TestSessionStatus_1 = require("../test-session/TestSessionStatus");
const collectTestFiles_1 = require("./collectTestFiles");
const TestSessionStatus_js_1 = require("../test-session/TestSessionStatus.js");
const collectTestFiles_js_1 = require("./collectTestFiles.js");
function createTestSessions(config, groupConfigs) {

@@ -51,3 +51,3 @@ var _a;

const baseDir = group.configFilePath ? path_1.default.dirname(group.configFilePath) : process.cwd();
const testFilesForGroup = (0, collectTestFiles_1.collectTestFiles)(group.files, baseDir)
const testFilesForGroup = (0, collectTestFiles_js_1.collectTestFiles)(group.files, baseDir)
// Normalize file path because glob returns windows paths with forward slashes:

@@ -80,3 +80,3 @@ // C:/foo/bar -> C:\foo\bar

browser,
status: TestSessionStatus_1.SESSION_STATUS.SCHEDULED,
status: TestSessionStatus_js_1.SESSION_STATUS.SCHEDULED,
testFile,

@@ -83,0 +83,0 @@ errors: [],

@@ -1,5 +0,5 @@

import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { BasicTestSession } from '../test-session/BasicTestSession';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { BasicTestSession } from '../test-session/BasicTestSession.js';
export declare function toBrowserPath(filePath: string): string;
export declare function createSessionUrl(config: TestRunnerCoreConfig, session: BasicTestSession): string;
//# sourceMappingURL=createSessionUrl.d.ts.map

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

const path_1 = __importDefault(require("path"));
const constants_1 = require("../utils/constants");
const constants_js_1 = require("../utils/constants.js");
const toBrowserPathRegExp = new RegExp(path_1.default.sep === '\\' ? '\\\\' : path_1.default.sep, 'g');

@@ -25,3 +25,3 @@ function toBrowserPath(filePath) {

}
const params = `?${constants_1.PARAM_SESSION_ID}=${session.id}`;
const params = `?${constants_js_1.PARAM_SESSION_ID}=${session.id}`;
return `${config.protocol}//${config.hostname}:${config.port}${browserPath}${params}`;

@@ -28,0 +28,0 @@ }

@@ -1,8 +0,8 @@

import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestSession } from '../test-session/TestSession';
import { TestCoverage } from '../coverage/getTestCoverage';
import { TestSessionManager } from '../test-session/TestSessionManager';
import { EventEmitter } from '../utils/EventEmitter';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestRunnerGroupConfig } from '../config/TestRunnerGroupConfig';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { TestSession } from '../test-session/TestSession.js';
import { TestCoverage } from '../coverage/getTestCoverage.js';
import { TestSessionManager } from '../test-session/TestSessionManager.js';
import { EventEmitter } from '../utils/EventEmitter.js';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher.js';
import { TestRunnerGroupConfig } from '../config/TestRunnerGroupConfig.js';
interface EventMap {

@@ -9,0 +9,0 @@ 'test-run-started': {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestRunner = void 0;
const createSessionGroups_1 = require("./createSessionGroups");
const getTestCoverage_1 = require("../coverage/getTestCoverage");
const TestScheduler_1 = require("./TestScheduler");
const TestSessionManager_1 = require("../test-session/TestSessionManager");
const TestSessionStatus_1 = require("../test-session/TestSessionStatus");
const EventEmitter_1 = require("../utils/EventEmitter");
const createSessionUrl_1 = require("./createSessionUrl");
const createDebugSessions_1 = require("./createDebugSessions");
const TestRunnerServer_1 = require("../server/TestRunnerServer");
class TestRunner extends EventEmitter_1.EventEmitter {
const createSessionGroups_js_1 = require("./createSessionGroups.js");
const getTestCoverage_js_1 = require("../coverage/getTestCoverage.js");
const TestScheduler_js_1 = require("./TestScheduler.js");
const TestSessionManager_js_1 = require("../test-session/TestSessionManager.js");
const TestSessionStatus_js_1 = require("../test-session/TestSessionStatus.js");
const EventEmitter_js_1 = require("../utils/EventEmitter.js");
const createSessionUrl_js_1 = require("./createSessionUrl.js");
const createDebugSessions_js_1 = require("./createDebugSessions.js");
const TestRunnerServer_js_1 = require("../server/TestRunnerServer.js");
class TestRunner extends EventEmitter_js_1.EventEmitter {
constructor(config, groupConfigs = []) {

@@ -32,3 +32,3 @@ super();

}
const { sessionGroups, testFiles, testSessions, browsers } = (0, createSessionGroups_1.createTestSessions)(config, groupConfigs);
const { sessionGroups, testFiles, testSessions, browsers } = (0, createSessionGroups_js_1.createTestSessions)(config, groupConfigs);
this.config = config;

@@ -39,9 +39,9 @@ this.testFiles = testFiles;

this.browserNames.sort((a, b) => this.browsers.findIndex(br => br.name === a) - this.browsers.findIndex(br => br.name === b));
this.sessions = new TestSessionManager_1.TestSessionManager(sessionGroups, testSessions);
this.scheduler = new TestScheduler_1.TestScheduler(config, this.sessions, browsers);
this.server = new TestRunnerServer_1.TestRunnerServer(this.config, this, this.sessions, this.testFiles, sessions => {
this.sessions = new TestSessionManager_js_1.TestSessionManager(sessionGroups, testSessions);
this.scheduler = new TestScheduler_js_1.TestScheduler(config, this.sessions, browsers);
this.server = new TestRunnerServer_js_1.TestRunnerServer(this.config, this, this.sessions, this.testFiles, sessions => {
this.runTests(sessions);
});
this.sessions.on('session-status-updated', session => {
if (session.status === TestSessionStatus_1.SESSION_STATUS.FINISHED) {
if (session.status === TestSessionStatus_js_1.SESSION_STATUS.FINISHED) {
this.onSessionFinished();

@@ -135,7 +135,7 @@ }

const sessions = this.sessions.forTestFile(testFile);
const debugSessions = (0, createDebugSessions_1.createDebugSessions)(Array.from(sessions));
const debugSessions = (0, createDebugSessions_js_1.createDebugSessions)(Array.from(sessions));
this.sessions.addDebug(...debugSessions);
for (const session of debugSessions) {
session.browser
.startDebugSession(session.id, (0, createSessionUrl_1.createSessionUrl)(this.config, session))
.startDebugSession(session.id, (0, createSessionUrl_js_1.createSessionUrl)(this.config, session))
.catch(error => {

@@ -148,3 +148,3 @@ console.error(error);

try {
const finishedAll = Array.from(this.sessions.all()).every(s => s.status === TestSessionStatus_1.SESSION_STATUS.FINISHED);
const finishedAll = Array.from(this.sessions.all()).every(s => s.status === TestSessionStatus_js_1.SESSION_STATUS.FINISHED);
if (finishedAll) {

@@ -154,3 +154,3 @@ let passedCoverage = true;

if (this.config.coverage) {
testCoverage = (0, getTestCoverage_1.getTestCoverage)(this.sessions.all(), this.config.coverageConfig);
testCoverage = (0, getTestCoverage_js_1.getTestCoverage)(this.sessions.all(), this.config.coverageConfig);
passedCoverage = testCoverage.passed;

@@ -157,0 +157,0 @@ }

@@ -1,5 +0,5 @@

import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestSessionManager } from '../test-session/TestSessionManager';
import { TestSession, TestResultError } from '../test-session/TestSession';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { TestSessionManager } from '../test-session/TestSessionManager.js';
import { TestSession, TestResultError } from '../test-session/TestSession.js';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher.js';
export declare class TestScheduler {

@@ -6,0 +6,0 @@ private config;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestScheduler = void 0;
const createSessionUrl_1 = require("./createSessionUrl");
const TestSessionStatus_1 = require("../test-session/TestSessionStatus");
const async_1 = require("../utils/async");
const TestSessionTimeoutHandler_1 = require("./TestSessionTimeoutHandler");
const createSessionUrl_js_1 = require("./createSessionUrl.js");
const TestSessionStatus_js_1 = require("../test-session/TestSessionStatus.js");
const async_js_1 = require("../utils/async.js");
const TestSessionTimeoutHandler_js_1 = require("./TestSessionTimeoutHandler.js");
class TestScheduler {

@@ -15,3 +15,3 @@ constructor(config, sessions, browsers) {

this.browsers = [...browsers].sort((a, b) => (a.__experimentalWindowFocus__ ? 1 : 0) - (b.__experimentalWindowFocus__ ? 1 : 0));
this.timeoutHandler = new TestSessionTimeoutHandler_1.TestSessionTimeoutHandler(this.config, this.sessions, this);
this.timeoutHandler = new TestSessionTimeoutHandler_js_1.TestSessionTimeoutHandler(this.config, this.sessions, this);
this.browserStartTimeoutMsg =

@@ -21,7 +21,7 @@ `The browser was unable to create and start a test page after ${this.config.browserStartTimeout}ms. ` +

sessions.on('session-status-updated', async (session) => {
if (session.status === TestSessionStatus_1.SESSION_STATUS.TEST_STARTED) {
if (session.status === TestSessionStatus_js_1.SESSION_STATUS.TEST_STARTED) {
this.timeoutHandler.waitForTestsFinished(session.testRun, session.id);
return;
}
if (session.status === TestSessionStatus_1.SESSION_STATUS.TEST_FINISHED) {
if (session.status === TestSessionStatus_js_1.SESSION_STATUS.TEST_FINISHED) {
// the session finished executing tests, close the browser page

@@ -31,3 +31,3 @@ await this.stopSession(session);

}
if (session.status === TestSessionStatus_1.SESSION_STATUS.FINISHED) {
if (session.status === TestSessionStatus_js_1.SESSION_STATUS.FINISHED) {
this.timeoutHandler.clearTimeoutsForSession(session);

@@ -48,3 +48,3 @@ setTimeout(() => {

for (const session of sessionsToSchedule) {
this.sessions.updateStatus(Object.assign(Object.assign({}, session), { testRun, request404s: [] }), TestSessionStatus_1.SESSION_STATUS.SCHEDULED);
this.sessions.updateStatus(Object.assign(Object.assign({}, session), { testRun, request404s: [] }), TestSessionStatus_js_1.SESSION_STATUS.SCHEDULED);
}

@@ -94,4 +94,4 @@ this.runNextScheduled();

async startSession(session) {
const updatedSession = Object.assign(Object.assign({}, session), { status: TestSessionStatus_1.SESSION_STATUS.INITIALIZING });
this.sessions.updateStatus(updatedSession, TestSessionStatus_1.SESSION_STATUS.INITIALIZING);
const updatedSession = Object.assign(Object.assign({}, session), { status: TestSessionStatus_js_1.SESSION_STATUS.INITIALIZING });
this.sessions.updateStatus(updatedSession, TestSessionStatus_js_1.SESSION_STATUS.INITIALIZING);
let browserStarted = false;

@@ -108,3 +108,3 @@ // browser should be started within the specified milliseconds

try {
await (0, async_1.withTimeout)(updatedSession.browser.startSession(updatedSession.id, (0, createSessionUrl_1.createSessionUrl)(this.config, updatedSession)), this.browserStartTimeoutMsg, this.config.browserStartTimeout);
await (0, async_js_1.withTimeout)(updatedSession.browser.startSession(updatedSession.id, (0, createSessionUrl_js_1.createSessionUrl)(this.config, updatedSession)), this.browserStartTimeoutMsg, this.config.browserStartTimeout);
// when the browser started, wait for session to ping back on time

@@ -142,3 +142,3 @@ this.timeoutHandler.waitForTestsStarted(updatedSession.testRun, updatedSession.id);

if (session.browser.isActive(session.id)) {
const { testCoverage, errors } = await (0, async_1.withTimeout)(session.browser.stopSession(session.id), 'Timed out stopping the browser page', this.config.testsFinishTimeout);
const { testCoverage, errors } = await (0, async_js_1.withTimeout)(session.browser.stopSession(session.id), 'Timed out stopping the browser page', this.config.testsFinishTimeout);
updatedSession.errors = [...((_a = updatedSession.errors) !== null && _a !== void 0 ? _a : []), ...(errors !== null && errors !== void 0 ? errors : [])];

@@ -157,3 +157,3 @@ updatedSession.testCoverage = testCoverage;

}
this.sessions.updateStatus(updatedSession, TestSessionStatus_1.SESSION_STATUS.FINISHED);
this.sessions.updateStatus(updatedSession, TestSessionStatus_js_1.SESSION_STATUS.FINISHED);
const remaining = this.getUnfinishedSessions(session.browser);

@@ -179,3 +179,3 @@ if (!this.config.watch &&

getScheduledSessions(browser) {
return Array.from(this.sessions.filtered(s => s.browser === browser && s.status === TestSessionStatus_1.SESSION_STATUS.SCHEDULED));
return Array.from(this.sessions.filtered(s => s.browser === browser && s.status === TestSessionStatus_js_1.SESSION_STATUS.SCHEDULED));
}

@@ -185,9 +185,9 @@ getRunningSessions(browser) {

[
TestSessionStatus_1.SESSION_STATUS.INITIALIZING,
TestSessionStatus_1.SESSION_STATUS.TEST_STARTED,
TestSessionStatus_1.SESSION_STATUS.TEST_FINISHED,
TestSessionStatus_js_1.SESSION_STATUS.INITIALIZING,
TestSessionStatus_js_1.SESSION_STATUS.TEST_STARTED,
TestSessionStatus_js_1.SESSION_STATUS.TEST_FINISHED,
].includes(s.status)));
}
getUnfinishedSessions(browser) {
return Array.from(this.sessions.filtered(s => s.browser === browser && s.status !== TestSessionStatus_1.SESSION_STATUS.FINISHED));
return Array.from(this.sessions.filtered(s => s.browser === browser && s.status !== TestSessionStatus_js_1.SESSION_STATUS.FINISHED));
}

@@ -194,0 +194,0 @@ }

/// <reference types="node" />
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestSessionManager } from '../test-session/TestSessionManager';
import { TestSession } from '../test-session/TestSession';
import { TestScheduler } from './TestScheduler';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { TestSessionManager } from '../test-session/TestSessionManager.js';
import { TestSession } from '../test-session/TestSession.js';
import { TestScheduler } from './TestScheduler.js';
export declare class TestSessionTimeoutHandler {

@@ -7,0 +7,0 @@ private timeoutIdsPerSession;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestSessionTimeoutHandler = void 0;
const TestSessionStatus_1 = require("../test-session/TestSessionStatus");
const TestSessionStatus_js_1 = require("../test-session/TestSessionStatus.js");
class TestSessionTimeoutHandler {

@@ -19,3 +19,3 @@ constructor(config, sessions, scheduler) {

}
if (session.status === TestSessionStatus_1.SESSION_STATUS.INITIALIZING) {
if (session.status === TestSessionStatus_js_1.SESSION_STATUS.INITIALIZING) {
this.setSessionFailed(session, {

@@ -38,3 +38,3 @@ message: `Browser tests did not start after ${this.config.testsStartTimeout}ms ` +

}
if (session.status !== TestSessionStatus_1.SESSION_STATUS.TEST_FINISHED) {
if (session.status !== TestSessionStatus_js_1.SESSION_STATUS.TEST_FINISHED) {
this.setSessionFailed(session, {

@@ -41,0 +41,0 @@ message: `Browser tests did not finish within ${this.config.testsFinishTimeout}ms. ` +

import { Middleware } from '@web/dev-server-core';
import { FSWatcher } from 'chokidar';
import { TestSessionManager } from '../../test-session/TestSessionManager';
import { TestSession } from '../../test-session/TestSession';
import { TestSessionManager } from '../../test-session/TestSessionManager.js';
import { TestSession } from '../../test-session/TestSession.js';
export type RunSessions = (sessions: Iterable<TestSession>) => void;

@@ -6,0 +6,0 @@ export interface DependencyGraphMiddlewareArgs {

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

const path_1 = __importDefault(require("path"));
const __1 = require("../..");
const index_js_1 = require("../../index.js");
const IGNORED_404s = ['favicon.ico'];
const { PARAM_SESSION_ID } = __1.constants;
const { PARAM_SESSION_ID } = index_js_1.constants;
function onRerunSessions(runSessions, sessions, sessionIds) {

@@ -15,0 +15,0 @@ const sessionsToRerun = sessionIds

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

const source_map_1 = require("source-map");
const fetchSourceMap_1 = require("../../../utils/fetchSourceMap");
const fetchSourceMap_js_1 = require("../../../utils/fetchSourceMap.js");
function resolveRelativeTo(relativeTo, filePath) {

@@ -31,3 +31,3 @@ if (path_1.default.isAbsolute(filePath)) {

if (!cachedSourceMaps.has(cacheKey)) {
cachedSourceMaps.set(cacheKey, (0, fetchSourceMap_1.fetchSourceMap)({
cachedSourceMaps.set(cacheKey, (0, fetchSourceMap_js_1.fetchSourceMap)({
protocol,

@@ -34,0 +34,0 @@ host,

import { MapStackLocation } from '@web/browser-logs';
import { MapBrowserUrl } from '@web/browser-logs/src/parseStackTrace';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig';
import { TestResultError, TestSession } from '../../../test-session/TestSession';
import { MapBrowserUrl } from '@web/browser-logs';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig.js';
import { TestResultError, TestSession } from '../../../test-session/TestSession.js';
export declare function replaceErrorStack(error: TestResultError, mapBrowserUrl: MapBrowserUrl, mapStackLocation: MapStackLocation, rootDir: string): Promise<void>;

@@ -6,0 +6,0 @@ export declare function parseSessionErrors(config: TestRunnerCoreConfig, mapBrowserUrl: MapBrowserUrl, mapStackLocation: MapStackLocation, result: Partial<TestSession>): Promise<void>;

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

const browser_logs_1 = require("@web/browser-logs");
const async_1 = require("../../../utils/async");
const async_js_1 = require("../../../utils/async.js");
async function replaceErrorStack(error, mapBrowserUrl, mapStackLocation, rootDir) {

@@ -25,3 +25,3 @@ try {

}
await (0, async_1.forEachAsync)(result.errors, err => {
await (0, async_js_1.forEachAsync)(result.errors, err => {
if (err.stack) {

@@ -38,3 +38,3 @@ return replaceErrorStack(err, mapBrowserUrl, mapStackLocation, config.rootDir);

async function iterateTests(tests) {
await (0, async_1.forEachAsync)(tests, async (test) => {
await (0, async_js_1.forEachAsync)(tests, async (test) => {
var _a;

@@ -50,3 +50,3 @@ if ((_a = test.error) === null || _a === void 0 ? void 0 : _a.stack) {

async function iterateSuites(suites) {
await (0, async_1.forEachAsync)(suites, s => iterateSuite(s));
await (0, async_js_1.forEachAsync)(suites, s => iterateSuite(s));
}

@@ -53,0 +53,0 @@ await iterateSuite(result.testResults);

import { MapStackLocation } from '@web/browser-logs';
import { MapBrowserUrl } from '@web/browser-logs/src/parseStackTrace';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig';
import { TestSession } from '../../../test-session/TestSession';
import { MapBrowserUrl } from '@web/browser-logs';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig.js';
import { TestSession } from '../../../test-session/TestSession.js';
export declare function parseBrowserLogs(config: TestRunnerCoreConfig, mapBrowserUrl: MapBrowserUrl, mapStackLocation: MapStackLocation, result: Partial<TestSession>): Promise<void>;
//# sourceMappingURL=parseBrowserLogs.d.ts.map

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

const browser_logs_1 = require("@web/browser-logs");
const async_1 = require("../../../utils/async");
const async_js_1 = require("../../../utils/async.js");
async function parseBrowserLog(browserLog, mapBrowserUrl, mapStackLocation, config) {
const browserRootDir = config.rootDir;
const args = await (0, async_1.mapAsync)(browserLog.args, arg => (0, browser_logs_1.deserialize)(arg, { browserRootDir, mapBrowserUrl, mapStackLocation }));
const args = await (0, async_js_1.mapAsync)(browserLog.args, arg => (0, browser_logs_1.deserialize)(arg, { browserRootDir, mapBrowserUrl, mapStackLocation }));
return { type: browserLog.type, args };

@@ -17,3 +17,3 @@ }

const browserLogs = result.logs;
const logsWithType = await (0, async_1.mapAsync)(browserLogs, b => parseBrowserLog(b, mapBrowserUrl, mapStackLocation, config));
const logsWithType = await (0, async_js_1.mapAsync)(browserLogs, b => parseBrowserLog(b, mapBrowserUrl, mapStackLocation, config));
const logs = [];

@@ -20,0 +20,0 @@ for (const log of logsWithType) {

@@ -1,6 +0,6 @@

import { MapBrowserUrl } from '@web/browser-logs/src/parseStackTrace';
import { MapBrowserUrl } from '@web/browser-logs';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig';
import { TestSession } from '../../../test-session/TestSession';
import { SourceMapFunction } from './createSourceMapFunction';
import { SourceMapFunction } from './createSourceMapFunction.js';
export declare function parseBrowserResult(config: TestRunnerCoreConfig, mapBrowserUrl: MapBrowserUrl, sourceMapFunction: SourceMapFunction, userAgent: string, result: Partial<TestSession>): Promise<Partial<TestSession>>;
//# sourceMappingURL=parseBrowserResult.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseBrowserResult = void 0;
const parseBrowserErrors_1 = require("./parseBrowserErrors");
const parseBrowserLogs_1 = require("./parseBrowserLogs");
const parseBrowserErrors_js_1 = require("./parseBrowserErrors.js");
const parseBrowserLogs_js_1 = require("./parseBrowserLogs.js");
function createMapStackLocation(smFn, userAgent) {

@@ -15,9 +15,9 @@ return async function mapStackLocation(originalLoc) {

await Promise.all([
(0, parseBrowserLogs_1.parseBrowserLogs)(config, mapBrowserUrl, mapStackLocation, result).catch(error => {
(0, parseBrowserLogs_js_1.parseBrowserLogs)(config, mapBrowserUrl, mapStackLocation, result).catch(error => {
console.error(error);
}),
(0, parseBrowserErrors_1.parseSessionErrors)(config, mapBrowserUrl, mapStackLocation, result).catch(error => {
(0, parseBrowserErrors_js_1.parseSessionErrors)(config, mapBrowserUrl, mapStackLocation, result).catch(error => {
console.error(error);
}),
(0, parseBrowserErrors_1.parseTestResults)(config, mapBrowserUrl, mapStackLocation, result).catch(error => {
(0, parseBrowserErrors_js_1.parseTestResults)(config, mapBrowserUrl, mapStackLocation, result).catch(error => {
console.error(error);

@@ -24,0 +24,0 @@ }),

import { Context, ServerStartParams } from '@web/dev-server-core';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig';
import { TestSessionManager } from '../../../test-session/TestSessionManager';
import { TestRunnerPlugin } from '../../TestRunnerPlugin';
import { TestSession } from '../../../test-session/TestSession';
import { TestRunner } from '../../../runner/TestRunner';
import { DebugTestSession } from '../../../test-session/DebugTestSession';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig.js';
import { TestSessionManager } from '../../../test-session/TestSessionManager.js';
import { TestRunnerPlugin } from '../../TestRunnerPlugin.js';
import { TestSession } from '../../../test-session/TestSession.js';
import { TestRunner } from '../../../runner/TestRunner.js';
import { DebugTestSession } from '../../../test-session/DebugTestSession.js';
interface SessionMessage extends Record<string, unknown> {

@@ -9,0 +9,0 @@ sessionId: string;

@@ -9,6 +9,6 @@ "use strict";

const co_body_1 = __importDefault(require("co-body"));
const constants_1 = require("../../../utils/constants");
const TestSessionStatus_1 = require("../../../test-session/TestSessionStatus");
const parseBrowserResult_1 = require("./parseBrowserResult");
const createSourceMapFunction_1 = require("./createSourceMapFunction");
const constants_js_1 = require("../../../utils/constants.js");
const TestSessionStatus_js_1 = require("../../../test-session/TestSessionStatus.js");
const parseBrowserResult_js_1 = require("./parseBrowserResult.js");
const createSourceMapFunction_js_1 = require("./createSourceMapFunction.js");
function createMapBrowserUrl(rootDir) {

@@ -33,7 +33,7 @@ return function mapBrowserUrl(url) {

this.mapBrowserUrl = createMapBrowserUrl(config.rootDir);
this.sourceMapFunction = (0, createSourceMapFunction_1.createSourceMapFunction)(this.config.protocol, this.config.hostname, this.config.port);
this.sourceMapFunction = (0, createSourceMapFunction_js_1.createSourceMapFunction)(this.config.protocol, this.config.hostname, this.config.port);
this.testRunner.on('test-run-started', ({ testRun }) => {
if (testRun !== 0) {
// create a new source map function to clear the cached source maps
this.sourceMapFunction = (0, createSourceMapFunction_1.createSourceMapFunction)(this.config.protocol, this.config.hostname, this.config.port);
this.sourceMapFunction = (0, createSourceMapFunction_js_1.createSourceMapFunction)(this.config.protocol, this.config.hostname, this.config.port);
}

@@ -57,3 +57,3 @@ });

if (context.response.is('html')) {
const sessionId = context.URL.searchParams.get(constants_1.PARAM_SESSION_ID);
const sessionId = context.URL.searchParams.get(constants_js_1.PARAM_SESSION_ID);
if (!sessionId) {

@@ -120,3 +120,3 @@ return;

_onSessionStarted(session) {
if (session.status !== TestSessionStatus_1.SESSION_STATUS.INITIALIZING) {
if (session.status !== TestSessionStatus_js_1.SESSION_STATUS.INITIALIZING) {
this._onMultiInitialized(session);

@@ -126,3 +126,3 @@ return;

// mark the session as started
this.sessions.updateStatus(session, TestSessionStatus_1.SESSION_STATUS.TEST_STARTED);
this.sessions.updateStatus(session, TestSessionStatus_js_1.SESSION_STATUS.TEST_STARTED);
}

@@ -138,4 +138,4 @@ async _onSessionFinished(rawData, session, message) {

}
const result = await (0, parseBrowserResult_1.parseBrowserResult)(this.config, this.mapBrowserUrl, this.sourceMapFunction, rawData.userAgent, message.result);
this.sessions.updateStatus(Object.assign(Object.assign({}, session), result), TestSessionStatus_1.SESSION_STATUS.TEST_FINISHED);
const result = await (0, parseBrowserResult_js_1.parseBrowserResult)(this.config, this.mapBrowserUrl, this.sourceMapFunction, rawData.userAgent, message.result);
this.sessions.updateStatus(Object.assign(Object.assign({}, session), result), TestSessionStatus_js_1.SESSION_STATUS.TEST_FINISHED);
}

@@ -180,3 +180,3 @@ async _onCommand(webSocket, session, message) {

}
if ((session === null || session === void 0 ? void 0 : session.status) !== TestSessionStatus_1.SESSION_STATUS.TEST_STARTED) {
if ((session === null || session === void 0 ? void 0 : session.status) !== TestSessionStatus_js_1.SESSION_STATUS.TEST_STARTED) {
// websocket closed after finishing the tests, this is expected

@@ -189,3 +189,3 @@ return;

const updatedSession = this.sessions.get(sessionId);
if ((updatedSession === null || updatedSession === void 0 ? void 0 : updatedSession.status) !== TestSessionStatus_1.SESSION_STATUS.TEST_STARTED) {
if ((updatedSession === null || updatedSession === void 0 ? void 0 : updatedSession.status) !== TestSessionStatus_js_1.SESSION_STATUS.TEST_STARTED) {
// something else handled the disconnect

@@ -214,3 +214,3 @@ return;

var _a;
this.sessions.updateStatus(Object.assign(Object.assign({}, session), { errors: [...((_a = session.errors) !== null && _a !== void 0 ? _a : []), { message }] }), TestSessionStatus_1.SESSION_STATUS.TEST_FINISHED);
this.sessions.updateStatus(Object.assign(Object.assign({}, session), { errors: [...((_a = session.errors) !== null && _a !== void 0 ? _a : []), { message }] }), TestSessionStatus_js_1.SESSION_STATUS.TEST_FINISHED);
}

@@ -217,0 +217,0 @@ }

import { Context } from '@web/dev-server-core';
import { TestRunnerCoreConfig } from '../../config/TestRunnerCoreConfig';
import { TestSessionManager } from '../../test-session/TestSessionManager';
import { TestRunnerCoreConfig } from '../../config/TestRunnerCoreConfig.js';
import { TestSessionManager } from '../../test-session/TestSessionManager.js';
export declare function serveTestRunnerHtmlPlugin(config: TestRunnerCoreConfig, testFiles: string[], sessions: TestSessionManager, testFrameworkImport?: string): {

@@ -5,0 +5,0 @@ name: string;

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

const dev_server_core_1 = require("@web/dev-server-core");
const constants_1 = require("../../utils/constants");
const utils_1 = require("../utils");
const trackBrowserLogs_1 = require("./trackBrowserLogs");
const constants_js_1 = require("../../utils/constants.js");
const utils_js_1 = require("../utils.js");
const trackBrowserLogs_js_1 = require("./trackBrowserLogs.js");
const iframeModePage = `

@@ -28,6 +28,6 @@ <!DOCTYPE html>

async function getManualListItem(config, context, testFile) {
const testImportPath = await (0, utils_1.createTestFileImportPath)(config, context, testFile);
const testImportPath = await (0, utils_js_1.createTestFileImportPath)(config, context, testFile);
const displayedPath = testImportPath.split('?')[0].substring(1);
const pagename = displayedPath.endsWith('.html') ? displayedPath : '/';
const href = `${pagename}?${constants_1.PARAM_TEST_FILE}=${encodeURIComponent(testImportPath)}`;
const href = `${pagename}?${constants_js_1.PARAM_TEST_FILE}=${encodeURIComponent(testImportPath)}`;
return `<li><a href="${href}">${displayedPath}</a></li>`;

@@ -78,3 +78,3 @@ }

const configScript = `<script type="module">window.__WTR_CONFIG__ = ${JSON.stringify(config)}</script>`;
const injectedHtml = `${preloadLink}${browserLogs ? `${trackBrowserLogs_1.trackBrowserLogs}` : ''}${configScript}`;
const injectedHtml = `${preloadLink}${browserLogs ? `${trackBrowserLogs_js_1.trackBrowserLogs}` : ''}${configScript}`;
const injectLocation = getInjectIndex(html);

@@ -109,6 +109,6 @@ return `${html.substring(0, injectLocation)}${injectedHtml}${html.substring(injectLocation)}`;

const { searchParams } = context.URL;
if (searchParams.has(constants_1.PARAM_TEST_FILE)) {
if (searchParams.has(constants_js_1.PARAM_TEST_FILE)) {
return createTestRunnerHtml(testFrameworkImport, config);
}
const sessionId = searchParams.get(constants_1.PARAM_SESSION_ID);
const sessionId = searchParams.get(constants_js_1.PARAM_SESSION_ID);
if (sessionId) {

@@ -144,3 +144,3 @@ const session = (_a = sessions.get(sessionId)) !== null && _a !== void 0 ? _a : sessions.getDebug(sessionId);

const { searchParams } = context.URL;
const sessionId = searchParams.get(constants_1.PARAM_SESSION_ID);
const sessionId = searchParams.get(constants_js_1.PARAM_SESSION_ID);
if (sessionId) {

@@ -151,3 +151,3 @@ const session = (_a = sessions.get(sessionId)) !== null && _a !== void 0 ? _a : sessions.getDebug(sessionId);

}
const testFile = await (0, utils_1.createTestFileImportPath)(config, context, session.testFile, sessionId);
const testFile = await (0, utils_js_1.createTestFileImportPath)(config, context, session.testFile, sessionId);
const runtimeConfig = {

@@ -162,3 +162,3 @@ testFile,

}
const testFile = searchParams.get(constants_1.PARAM_TEST_FILE);
const testFile = searchParams.get(constants_js_1.PARAM_TEST_FILE);
if (testFile) {

@@ -165,0 +165,0 @@ const runtimeConfig = {

@@ -1,2 +0,2 @@

import { RunSessions } from './middleware/watchFilesMiddleware';
import { RunSessions } from './middleware/watchFilesMiddleware.js';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';

@@ -3,0 +3,0 @@ import { TestSessionManager } from '../test-session/TestSessionManager';

@@ -9,7 +9,7 @@ "use strict";

const chokidar_1 = __importDefault(require("chokidar"));
const watchFilesMiddleware_1 = require("./middleware/watchFilesMiddleware");
const cacheMiddleware_1 = require("./middleware/cacheMiddleware");
const serveTestRunnerHtmlPlugin_1 = require("./plugins/serveTestRunnerHtmlPlugin");
const serveTestFrameworkPlugin_1 = require("./plugins/serveTestFrameworkPlugin");
const testRunnerApiPlugin_1 = require("./plugins/api/testRunnerApiPlugin");
const watchFilesMiddleware_js_1 = require("./middleware/watchFilesMiddleware.js");
const cacheMiddleware_js_1 = require("./middleware/cacheMiddleware.js");
const serveTestRunnerHtmlPlugin_js_1 = require("./plugins/serveTestRunnerHtmlPlugin.js");
const serveTestFrameworkPlugin_js_1 = require("./plugins/serveTestFrameworkPlugin.js");
const testRunnerApiPlugin_js_1 = require("./plugins/api/testRunnerApiPlugin.js");
const CACHED_PATTERNS = [

@@ -27,3 +27,3 @@ 'node_modules/@web/test-runner-',

const { testFrameworkImport, testFrameworkPlugin } = testFramework
? (0, serveTestFrameworkPlugin_1.serveTestFrameworkPlugin)(testFramework)
? (0, serveTestFrameworkPlugin_js_1.serveTestFrameworkPlugin)(testFramework)
: {};

@@ -41,9 +41,9 @@ const serverConfig = {

middleware: [
(0, watchFilesMiddleware_1.watchFilesMiddleware)({ runSessions, sessions, rootDir, fileWatcher: this.fileWatcher }),
(0, cacheMiddleware_1.cacheMiddleware)(CACHED_PATTERNS, config.watch),
(0, watchFilesMiddleware_js_1.watchFilesMiddleware)({ runSessions, sessions, rootDir, fileWatcher: this.fileWatcher }),
(0, cacheMiddleware_js_1.cacheMiddleware)(CACHED_PATTERNS, config.watch),
...(config.middleware || []),
],
plugins: [
(0, testRunnerApiPlugin_1.testRunnerApiPlugin)(config, testRunner, sessions, plugins),
(0, serveTestRunnerHtmlPlugin_1.serveTestRunnerHtmlPlugin)(config, testFiles, sessions, testFrameworkImport),
(0, testRunnerApiPlugin_js_1.testRunnerApiPlugin)(config, testRunner, sessions, plugins),
(0, serveTestRunnerHtmlPlugin_js_1.serveTestRunnerHtmlPlugin)(config, testFiles, sessions, testFrameworkImport),
testFrameworkPlugin,

@@ -50,0 +50,0 @@ ...(config.plugins || []),

import { Context } from '@web/dev-server-core';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
export declare function toBrowserPath(filePath: string): string;

@@ -4,0 +4,0 @@ export declare function toFilePath(browserPath: string): string;

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

const path_1 = __importDefault(require("path"));
const constants_1 = require("../utils/constants");
const constants_js_1 = require("../utils/constants.js");
const toBrowserPathRegExp = new RegExp(path_1.default.sep === '\\' ? '\\\\' : path_1.default.sep, 'g');

@@ -25,3 +25,3 @@ const toFilePathRegeExp = new RegExp('/', 'g');

const browserPath = `/${toBrowserPath(relativeToRootDir)}`;
const params = sessionId ? `?${constants_1.PARAM_SESSION_ID}=${sessionId}` : `?${constants_1.PARAM_MANUAL_SESSION}=true`;
const params = sessionId ? `?${constants_js_1.PARAM_SESSION_ID}=${sessionId}` : `?${constants_js_1.PARAM_MANUAL_SESSION}=true`;
let importPath = encodeURI(`${browserPath}${params}`);

@@ -28,0 +28,0 @@ // allow plugins to transform the import path

@@ -1,4 +0,4 @@

import { TestRunner, TestRunnerCoreConfig } from './index';
import { TestSession } from './test-session/TestSession';
import { TestRunnerGroupConfig } from './config/TestRunnerGroupConfig';
import { TestRunner, TestRunnerCoreConfig } from './index.js';
import { TestSession } from './test-session/TestSession.js';
import { TestRunnerGroupConfig } from './config/TestRunnerGroupConfig.js';
export declare function runTests(config: Partial<TestRunnerCoreConfig>, groupConfigs?: TestRunnerGroupConfig[], { allowFailure, reportErrors, }?: {

@@ -5,0 +5,0 @@ allowFailure?: boolean;

@@ -10,4 +10,4 @@ "use strict";

const path_1 = __importDefault(require("path"));
const index_1 = require("./index");
const TestSessionStatus_1 = require("./test-session/TestSessionStatus");
const index_js_1 = require("./index.js");
const TestSessionStatus_js_1 = require("./test-session/TestSessionStatus.js");
const logger = Object.assign(Object.assign({}, console), { debug() {

@@ -42,3 +42,3 @@ //

const finalConfig = Object.assign(Object.assign(Object.assign({ port }, defaultBaseConfig), config), { testFramework: Object.assign(Object.assign({}, defaultBaseConfig.testFramework), config.testFramework) });
const runner = new index_1.TestRunner(finalConfig, groupConfigs);
const runner = new index_js_1.TestRunner(finalConfig, groupConfigs);
let finished = false;

@@ -114,3 +114,3 @@ runner.on('test-run-finished', ({ testRun, testCoverage }) => {

}
if (!sessions.every(s => s.status === TestSessionStatus_1.SESSION_STATUS.FINISHED)) {
if (!sessions.every(s => s.status === TestSessionStatus_js_1.SESSION_STATUS.FINISHED)) {
reject(new Error('Tests did not finish'));

@@ -117,0 +117,0 @@ return;

import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestSessionGroup } from './TestSessionGroup';
import { TestSessionGroup } from './TestSessionGroup.js';
export interface BasicTestSession {

@@ -4,0 +4,0 @@ id: string;

@@ -1,2 +0,2 @@

import { BasicTestSession } from './BasicTestSession';
import { BasicTestSession } from './BasicTestSession.js';
export interface DebugTestSession extends BasicTestSession {

@@ -3,0 +3,0 @@ debug: true;

import { CoverageMapData } from 'istanbul-lib-coverage';
import { TestSessionStatus } from './TestSessionStatus';
import { BasicTestSession } from './BasicTestSession';
import { TestSessionStatus } from './TestSessionStatus.js';
import { BasicTestSession } from './BasicTestSession.js';
export interface TestResultError {

@@ -5,0 +5,0 @@ message: string;

@@ -1,7 +0,7 @@

import { TestSession } from './TestSession';
import { TestSessionStatus } from './TestSessionStatus';
import { EventEmitter } from '../utils/EventEmitter';
import { DebugTestSession } from './DebugTestSession';
import { TestSessionGroup } from './TestSessionGroup';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestSession } from './TestSession.js';
import { TestSessionStatus } from './TestSessionStatus.js';
import { EventEmitter } from '../utils/EventEmitter.js';
import { DebugTestSession } from './DebugTestSession.js';
import { TestSessionGroup } from './TestSessionGroup.js';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher.js';
interface EventMap {

@@ -8,0 +8,0 @@ 'session-status-updated': TestSession;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestSessionManager = void 0;
const EventEmitter_1 = require("../utils/EventEmitter");
const EventEmitter_js_1 = require("../utils/EventEmitter.js");
function* filtered(it, filter) {

@@ -14,3 +14,3 @@ while (true) {

}
class TestSessionManager extends EventEmitter_1.EventEmitter {
class TestSessionManager extends EventEmitter_js_1.EventEmitter {
constructor(groups, sessions) {

@@ -17,0 +17,0 @@ super();

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

const path_1 = __importDefault(require("path"));
const request_1 = require("./request");
const request_js_1 = require("./request.js");
function is2xxResponse(status) {

@@ -30,3 +30,3 @@ return typeof status === 'number' && status >= 200 && status < 300;

const sourcMapPath = path_1.default.join(dir, sourceMapUrl);
const { response: sourceMapResponse, body: sourceMap } = await (0, request_1.request)(Object.assign(Object.assign({}, reqOpts), { path: encodeURI(sourcMapPath) }));
const { response: sourceMapResponse, body: sourceMap } = await (0, request_js_1.request)(Object.assign(Object.assign({}, reqOpts), { path: encodeURI(sourcMapPath) }));
if (!is2xxResponse(sourceMapResponse.statusCode) || !sourceMap) {

@@ -58,3 +58,3 @@ return;

// account for accurate transformation
const { response, body: source } = await (0, request_1.request)(Object.assign(Object.assign({}, reqOpts), { path: encodeURI(args.browserUrl) }));
const { response, body: source } = await (0, request_js_1.request)(Object.assign(Object.assign({}, reqOpts), { path: encodeURI(args.browserUrl) }));
// we couldn't retreive this file, this could be because it is a generated file

@@ -61,0 +61,0 @@ // from a server plugin which no longer exists

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isTestFilePath = void 0;
const constants_1 = require("./constants");
const constants_js_1 = require("./constants.js");
/**

@@ -13,5 +13,5 @@ * Returns where a given path points to a test file. This should be

const url = new URL(path, 'http://localhost:123');
return url.searchParams.has(constants_1.PARAM_SESSION_ID) || url.searchParams.has(constants_1.PARAM_MANUAL_SESSION);
return url.searchParams.has(constants_js_1.PARAM_SESSION_ID) || url.searchParams.has(constants_js_1.PARAM_MANUAL_SESSION);
}
exports.isTestFilePath = isTestFilePath;
//# sourceMappingURL=isTestFilePath.js.map
// this file is autogenerated with the generate-mjs-dts-entrypoints script
export * from './dist/index';
export * from './dist/index.js';
{
"name": "@web/test-runner-core",
"version": "0.13.0",
"version": "0.13.1",
"publishConfig": {

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

"build": "tsc",
"test": "mocha test/**/*.test.ts --require ts-node/register",
"test:node": "mocha test/**/*.test.ts --require ts-node/register --reporter dot",
"test:watch": "mocha test/**/*.test.ts --require ts-node/register --watch --watch-files src,test"

@@ -72,3 +72,3 @@ },

"globby": "^11.0.1",
"ip": "^1.1.5",
"ip": "^2.0.1",
"istanbul-lib-coverage": "^3.0.0",

@@ -75,0 +75,0 @@ "istanbul-lib-report": "^3.0.1",

import logUpdate from 'log-update';
import cliCursor from 'cli-cursor';
import { BufferedConsole } from './BufferedConsole';
import { EventEmitter } from '../../utils/EventEmitter';
import { BufferedConsole } from './BufferedConsole.js';
import { EventEmitter } from '../../utils/EventEmitter.js';

@@ -7,0 +7,0 @@ const CLEAR_COMMAND = process.platform === 'win32' ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H';

@@ -6,15 +6,15 @@ import { codeFrameColumns } from '@babel/code-frame';

import { writeCoverageReport } from './writeCoverageReport';
import { getSelectFilesMenu } from './getSelectFilesMenu';
import { getWatchCommands } from './getWatchCommands';
import { DynamicTerminal } from './terminal/DynamicTerminal';
import { BufferedLogger } from './BufferedLogger';
import { getManualDebugMenu } from './getManualDebugMenu';
import { ErrorWithLocation } from '../logger/Logger';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestSessionManager } from '../test-session/TestSessionManager';
import { SESSION_STATUS } from '../test-session/TestSessionStatus';
import { Logger } from '../logger/Logger';
import { TestRunner } from '../runner/TestRunner';
import { TestCoverage } from '../coverage/getTestCoverage';
import { writeCoverageReport } from './writeCoverageReport.js';
import { getSelectFilesMenu } from './getSelectFilesMenu.js';
import { getWatchCommands } from './getWatchCommands.js';
import { DynamicTerminal } from './terminal/DynamicTerminal.js';
import { BufferedLogger } from './BufferedLogger.js';
import { getManualDebugMenu } from './getManualDebugMenu.js';
import { ErrorWithLocation } from '../logger/Logger.js';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { TestSessionManager } from '../test-session/TestSessionManager.js';
import { SESSION_STATUS } from '../test-session/TestSessionStatus.js';
import { Logger } from '../logger/Logger.js';
import { TestRunner } from '../runner/TestRunner.js';
import { TestCoverage } from '../coverage/getTestCoverage.js';

@@ -21,0 +21,0 @@ export type MenuType = 'none' | 'overview' | 'focus' | 'debug' | 'manual-debug';

import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestRunnerCoreConfig } from './TestRunnerCoreConfig';
import { TestRunnerCoreConfig } from './TestRunnerCoreConfig.js';

@@ -4,0 +4,0 @@ export interface TestRunnerGroupConfig {

export { CoverageMapData } from 'istanbul-lib-coverage';
import * as constants from './utils/constants';
import * as constants from './utils/constants.js';
export { constants };
export { BrowserLauncher, SessionResult } from './browser-launcher/BrowserLauncher';
export { BrowserLauncher, SessionResult } from './browser-launcher/BrowserLauncher.js';
export {

@@ -14,8 +14,8 @@ Reporter,

TestRunFinishedArgs,
} from './reporter/Reporter';
export { TestRunner } from './runner/TestRunner';
export { TestRunnerCli } from './cli/TestRunnerCli';
export { BufferedLogger } from './cli/BufferedLogger';
export { TestRunnerPlugin } from './server/TestRunnerPlugin';
export { TestFramework } from './test-framework/TestFramework';
} from './reporter/Reporter.js';
export { TestRunner } from './runner/TestRunner.js';
export { TestRunnerCli } from './cli/TestRunnerCli.js';
export { BufferedLogger } from './cli/BufferedLogger.js';
export { TestRunnerPlugin } from './server/TestRunnerPlugin.js';
export { TestFramework } from './test-framework/TestFramework.js';
export {

@@ -25,6 +25,6 @@ TestRunnerCoreConfig,

CoverageThresholdConfig,
} from './config/TestRunnerCoreConfig';
export { TestRunnerGroupConfig } from './config/TestRunnerGroupConfig';
export { TestCoverage } from './coverage/getTestCoverage';
export { Logger, ErrorWithLocation } from './logger/Logger';
} from './config/TestRunnerCoreConfig.js';
export { TestRunnerGroupConfig } from './config/TestRunnerGroupConfig.js';
export { TestCoverage } from './coverage/getTestCoverage.js';
export { Logger, ErrorWithLocation } from './logger/Logger.js';
export {

@@ -35,9 +35,9 @@ TestSession,

TestSuiteResult,
} from './test-session/TestSession';
export { DebugTestSession } from './test-session/DebugTestSession';
export { BasicTestSession } from './test-session/BasicTestSession';
export { TestSessionManager } from './test-session/TestSessionManager';
export { TestSessionStatus, SESSION_STATUS } from './test-session/TestSessionStatus';
export { EventEmitter } from './utils/EventEmitter';
export { isTestFilePath } from './utils/isTestFilePath';
export { fetchSourceMap } from './utils/fetchSourceMap';
} from './test-session/TestSession.js';
export { DebugTestSession } from './test-session/DebugTestSession.js';
export { BasicTestSession } from './test-session/BasicTestSession.js';
export { TestSessionManager } from './test-session/TestSessionManager.js';
export { TestSessionStatus, SESSION_STATUS } from './test-session/TestSessionStatus.js';
export { EventEmitter } from './utils/EventEmitter.js';
export { isTestFilePath } from './utils/isTestFilePath.js';
export { fetchSourceMap } from './utils/fetchSourceMap.js';
import { nanoid } from 'nanoid';
import path from 'path';
import { SESSION_STATUS } from '../test-session/TestSessionStatus';
import { TestSession } from '../test-session/TestSession';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestRunnerGroupConfig } from '../config/TestRunnerGroupConfig';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { collectTestFiles } from './collectTestFiles';
import { TestSessionGroup } from '../test-session/TestSessionGroup';
import { SESSION_STATUS } from '../test-session/TestSessionStatus.js';
import { TestSession } from '../test-session/TestSession.js';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { TestRunnerGroupConfig } from '../config/TestRunnerGroupConfig.js';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher.js';
import { collectTestFiles } from './collectTestFiles.js';
import { TestSessionGroup } from '../test-session/TestSessionGroup.js';

@@ -12,0 +12,0 @@ interface GroupConfigWithoutOptionals extends TestRunnerGroupConfig {

import path from 'path';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { PARAM_SESSION_ID } from '../utils/constants';
import { BasicTestSession } from '../test-session/BasicTestSession';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { PARAM_SESSION_ID } from '../utils/constants.js';
import { BasicTestSession } from '../test-session/BasicTestSession.js';

@@ -6,0 +6,0 @@ const toBrowserPathRegExp = new RegExp(path.sep === '\\' ? '\\\\' : path.sep, 'g');

@@ -1,14 +0,14 @@

import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { createTestSessions } from './createSessionGroups';
import { TestSession } from '../test-session/TestSession';
import { getTestCoverage, TestCoverage } from '../coverage/getTestCoverage';
import { TestScheduler } from './TestScheduler';
import { TestSessionManager } from '../test-session/TestSessionManager';
import { SESSION_STATUS } from '../test-session/TestSessionStatus';
import { EventEmitter } from '../utils/EventEmitter';
import { createSessionUrl } from './createSessionUrl';
import { createDebugSessions } from './createDebugSessions';
import { TestRunnerServer } from '../server/TestRunnerServer';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestRunnerGroupConfig } from '../config/TestRunnerGroupConfig';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { createTestSessions } from './createSessionGroups.js';
import { TestSession } from '../test-session/TestSession.js';
import { getTestCoverage, TestCoverage } from '../coverage/getTestCoverage.js';
import { TestScheduler } from './TestScheduler.js';
import { TestSessionManager } from '../test-session/TestSessionManager.js';
import { SESSION_STATUS } from '../test-session/TestSessionStatus.js';
import { EventEmitter } from '../utils/EventEmitter.js';
import { createSessionUrl } from './createSessionUrl.js';
import { createDebugSessions } from './createDebugSessions.js';
import { TestRunnerServer } from '../server/TestRunnerServer.js';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher.js';
import { TestRunnerGroupConfig } from '../config/TestRunnerGroupConfig.js';

@@ -15,0 +15,0 @@ interface EventMap {

@@ -1,9 +0,9 @@

import { createSessionUrl } from './createSessionUrl';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestSessionManager } from '../test-session/TestSessionManager';
import { TestSession, TestResultError } from '../test-session/TestSession';
import { SESSION_STATUS } from '../test-session/TestSessionStatus';
import { withTimeout } from '../utils/async';
import { TestSessionTimeoutHandler } from './TestSessionTimeoutHandler';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { createSessionUrl } from './createSessionUrl.js';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { TestSessionManager } from '../test-session/TestSessionManager.js';
import { TestSession, TestResultError } from '../test-session/TestSession.js';
import { SESSION_STATUS } from '../test-session/TestSessionStatus.js';
import { withTimeout } from '../utils/async.js';
import { TestSessionTimeoutHandler } from './TestSessionTimeoutHandler.js';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher.js';

@@ -10,0 +10,0 @@ export class TestScheduler {

@@ -1,6 +0,6 @@

import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestSessionManager } from '../test-session/TestSessionManager';
import { TestSession, TestResultError } from '../test-session/TestSession';
import { SESSION_STATUS } from '../test-session/TestSessionStatus';
import { TestScheduler } from './TestScheduler';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { TestSessionManager } from '../test-session/TestSessionManager.js';
import { TestSession, TestResultError } from '../test-session/TestSession.js';
import { SESSION_STATUS } from '../test-session/TestSessionStatus.js';
import { TestScheduler } from './TestScheduler.js';

@@ -7,0 +7,0 @@ export class TestSessionTimeoutHandler {

@@ -7,5 +7,5 @@ import { Middleware, Context } from '@web/dev-server-core';

import { TestSessionManager } from '../../test-session/TestSessionManager';
import { constants } from '../..';
import { TestSession } from '../../test-session/TestSession';
import { TestSessionManager } from '../../test-session/TestSessionManager.js';
import { constants } from '../../index.js';
import { TestSession } from '../../test-session/TestSession.js';

@@ -12,0 +12,0 @@ const IGNORED_404s = ['favicon.ico'];

@@ -5,3 +5,3 @@ import path from 'path';

import { fetchSourceMap } from '../../../utils/fetchSourceMap';
import { fetchSourceMap } from '../../../utils/fetchSourceMap.js';
import { StackLocation } from '@web/browser-logs';

@@ -8,0 +8,0 @@

import { MapStackLocation, parseStackTrace } from '@web/browser-logs';
import { MapBrowserUrl } from '@web/browser-logs/src/parseStackTrace';
import { MapBrowserUrl } from '@web/browser-logs';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig.js';
import {

@@ -10,4 +10,4 @@ TestResult,

TestSuiteResult,
} from '../../../test-session/TestSession';
import { forEachAsync } from '../../../utils/async';
} from '../../../test-session/TestSession.js';
import { forEachAsync } from '../../../utils/async.js';

@@ -14,0 +14,0 @@ export async function replaceErrorStack(

import { deserialize, MapStackLocation } from '@web/browser-logs';
import { MapBrowserUrl } from '@web/browser-logs/src/parseStackTrace';
import { MapBrowserUrl } from '@web/browser-logs';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig';
import { TestSession } from '../../../test-session/TestSession';
import { mapAsync } from '../../../utils/async';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig.js';
import { TestSession } from '../../../test-session/TestSession.js';
import { mapAsync } from '../../../utils/async.js';

@@ -8,0 +8,0 @@ interface BrowserLog {

@@ -1,9 +0,8 @@

import { MapStackLocation, StackLocation } from '@web/browser-logs';
import { MapBrowserUrl } from '@web/browser-logs/src/parseStackTrace';
import { MapStackLocation, StackLocation, MapBrowserUrl } from '@web/browser-logs';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig';
import { TestSession } from '../../../test-session/TestSession';
import { SourceMapFunction } from './createSourceMapFunction';
import { parseSessionErrors, parseTestResults } from './parseBrowserErrors';
import { parseBrowserLogs } from './parseBrowserLogs';
import { SourceMapFunction } from './createSourceMapFunction.js';
import { parseSessionErrors, parseTestResults } from './parseBrowserErrors.js';
import { parseBrowserLogs } from './parseBrowserLogs.js';

@@ -10,0 +9,0 @@ function createMapStackLocation(smFn: SourceMapFunction, userAgent: string): MapStackLocation {

import { Context, getRequestFilePath, ServerStartParams, WebSocket } from '@web/dev-server-core';
import { MapBrowserUrl } from '@web/browser-logs/src/parseStackTrace';
import { MapBrowserUrl } from '@web/browser-logs';
import parse from 'co-body';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig';
import { TestSessionManager } from '../../../test-session/TestSessionManager';
import { PARAM_SESSION_ID } from '../../../utils/constants';
import { TestRunnerPlugin } from '../../TestRunnerPlugin';
import { SESSION_STATUS } from '../../../test-session/TestSessionStatus';
import { TestSession } from '../../../test-session/TestSession';
import { parseBrowserResult } from './parseBrowserResult';
import { TestRunner } from '../../../runner/TestRunner';
import { createSourceMapFunction, SourceMapFunction } from './createSourceMapFunction';
import { DebugTestSession } from '../../../test-session/DebugTestSession';
import { TestRunnerCoreConfig } from '../../../config/TestRunnerCoreConfig.js';
import { TestSessionManager } from '../../../test-session/TestSessionManager.js';
import { PARAM_SESSION_ID } from '../../../utils/constants.js';
import { TestRunnerPlugin } from '../../TestRunnerPlugin.js';
import { SESSION_STATUS } from '../../../test-session/TestSessionStatus.js';
import { TestSession } from '../../../test-session/TestSession.js';
import { parseBrowserResult } from './parseBrowserResult.js';
import { TestRunner } from '../../../runner/TestRunner.js';
import { createSourceMapFunction, SourceMapFunction } from './createSourceMapFunction.js';
import { DebugTestSession } from '../../../test-session/DebugTestSession.js';

@@ -16,0 +16,0 @@ interface SessionMessage extends Record<string, unknown> {

import { Context, getRequestFilePath } from '@web/dev-server-core';
import { PARAM_SESSION_ID, PARAM_TEST_FILE } from '../../utils/constants';
import { TestRunnerCoreConfig } from '../../config/TestRunnerCoreConfig';
import { createTestFileImportPath } from '../utils';
import { trackBrowserLogs } from './trackBrowserLogs';
import { TestSessionManager } from '../../test-session/TestSessionManager';
import { TestRunnerGroupConfig } from '../../config/TestRunnerGroupConfig';
import { PARAM_SESSION_ID, PARAM_TEST_FILE } from '../../utils/constants.js';
import { TestRunnerCoreConfig } from '../../config/TestRunnerCoreConfig.js';
import { createTestFileImportPath } from '../utils.js';
import { trackBrowserLogs } from './trackBrowserLogs.js';
import { TestSessionManager } from '../../test-session/TestSessionManager.js';
import { TestRunnerGroupConfig } from '../../config/TestRunnerGroupConfig.js';

@@ -10,0 +10,0 @@ const iframeModePage = `

import { DevServer, Plugin } from '@web/dev-server-core';
import chokidar from 'chokidar';
import { RunSessions, watchFilesMiddleware } from './middleware/watchFilesMiddleware';
import { cacheMiddleware } from './middleware/cacheMiddleware';
import { serveTestRunnerHtmlPlugin } from './plugins/serveTestRunnerHtmlPlugin';
import { serveTestFrameworkPlugin } from './plugins/serveTestFrameworkPlugin';
import { testRunnerApiPlugin } from './plugins/api/testRunnerApiPlugin';
import { RunSessions, watchFilesMiddleware } from './middleware/watchFilesMiddleware.js';
import { cacheMiddleware } from './middleware/cacheMiddleware.js';
import { serveTestRunnerHtmlPlugin } from './plugins/serveTestRunnerHtmlPlugin.js';
import { serveTestFrameworkPlugin } from './plugins/serveTestFrameworkPlugin.js';
import { testRunnerApiPlugin } from './plugins/api/testRunnerApiPlugin.js';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';

@@ -10,0 +10,0 @@ import { TestSessionManager } from '../test-session/TestSessionManager';

import path from 'path';
import { Context } from '@web/dev-server-core';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { PARAM_SESSION_ID, PARAM_MANUAL_SESSION } from '../utils/constants';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig.js';
import { PARAM_SESSION_ID, PARAM_MANUAL_SESSION } from '../utils/constants.js';

@@ -6,0 +6,0 @@ const toBrowserPathRegExp = new RegExp(path.sep === '\\' ? '\\\\' : path.sep, 'g');

/* eslint-disable no-async-promise-executor, no-inner-declarations */
import { getPortPromise } from 'portfinder';
import path from 'path';
import { TestRunner, TestRunnerCoreConfig } from './index';
import { Logger } from './logger/Logger';
import { TestResult, TestSession, TestSuiteResult } from './test-session/TestSession';
import { SESSION_STATUS } from './test-session/TestSessionStatus';
import { TestRunnerGroupConfig } from './config/TestRunnerGroupConfig';
import { TestRunner, TestRunnerCoreConfig } from './index.js';
import { Logger } from './logger/Logger.js';
import { TestResult, TestSession, TestSuiteResult } from './test-session/TestSession.js';
import { SESSION_STATUS } from './test-session/TestSessionStatus.js';
import { TestRunnerGroupConfig } from './config/TestRunnerGroupConfig.js';

@@ -10,0 +10,0 @@ const logger: Logger = {

import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestSessionGroup } from './TestSessionGroup';
import { TestSessionGroup } from './TestSessionGroup.js';

@@ -4,0 +4,0 @@ export interface BasicTestSession {

@@ -1,2 +0,2 @@

import { BasicTestSession } from './BasicTestSession';
import { BasicTestSession } from './BasicTestSession.js';

@@ -3,0 +3,0 @@ export interface DebugTestSession extends BasicTestSession {

import { CoverageMapData } from 'istanbul-lib-coverage';
import { TestSessionStatus } from './TestSessionStatus';
import { BasicTestSession } from './BasicTestSession';
import { TestSessionStatus } from './TestSessionStatus.js';
import { BasicTestSession } from './BasicTestSession.js';

@@ -5,0 +5,0 @@ export interface TestResultError {

@@ -1,7 +0,7 @@

import { TestSession } from './TestSession';
import { TestSessionStatus } from './TestSessionStatus';
import { EventEmitter } from '../utils/EventEmitter';
import { DebugTestSession } from './DebugTestSession';
import { TestSessionGroup } from './TestSessionGroup';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestSession } from './TestSession.js';
import { TestSessionStatus } from './TestSessionStatus.js';
import { EventEmitter } from '../utils/EventEmitter.js';
import { DebugTestSession } from './DebugTestSession.js';
import { TestSessionGroup } from './TestSessionGroup.js';
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher.js';

@@ -8,0 +8,0 @@ interface EventMap {

@@ -5,3 +5,3 @@ import { mapFileCommentRegex, fromSource, SourceMapConverter, fromJSON } from 'convert-source-map';

import { request } from './request';
import { request } from './request.js';

@@ -8,0 +8,0 @@ function is2xxResponse(status?: number) {

@@ -1,2 +0,2 @@

import { PARAM_MANUAL_SESSION, PARAM_SESSION_ID } from './constants';
import { PARAM_MANUAL_SESSION, PARAM_SESSION_ID } from './constants.js';

@@ -3,0 +3,0 @@ /**

// this file is autogenerated with the generate-mjs-dts-entrypoints script
export * from './dist/test-helpers';
export * from './dist/test-helpers.js';

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

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

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

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

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

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

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

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

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