Socket
Socket
Sign inDemoInstall

@web/test-runner-core

Package Overview
Dependencies
Maintainers
5
Versions
144
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.2.2 to 0.2.3

6

CHANGELOG.md
# @web/test-runner-core
## 0.2.3
### Patch Changes
- 5a88530: merge TestSession and TestSessionResult
## 0.2.2

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

4

dist/coverage/getTestCoverage.js

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

for (const session of sessions) {
if (session.result.testCoverage) {
coverageMap.merge(session.result.testCoverage);
if (session.testCoverage) {
coverageMap.merge(session.testCoverage);
}

@@ -18,0 +18,0 @@ }

@@ -8,7 +8,6 @@ import * as constants from './browser-launcher/constants';

export { Server } from './server/Server';
export { TestSession } from './test-session/TestSession';
export { TestSession, FailedImport, TestResultError, TestResult } from './test-session/TestSession';
export { TestSessionManager } from './test-session/TestSessionManager';
export { TestSessionResult, FailedImport, TestResultError, TestResult, } from './test-session/TestSessionResult';
export { TestSessionStatus, SESSION_STATUS } from './test-session/TestSessionStatus';
export { EventEmitter } from './utils/EventEmitter';
//# sourceMappingURL=index.d.ts.map

@@ -18,2 +18,6 @@ "use strict";

testFile,
tests: [],
logs: [],
failedImports: [],
request404s: [],
}));

@@ -20,0 +24,0 @@ for (const session of sessionsForFile) {

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

setSessionFailed(session, error) {
this.sessions.updateStatus(session, TestSessionStatus_1.SESSION_STATUS.FINISHED, { passed: false, error });
this.sessions.updateStatus(Object.assign(Object.assign({}, session), { passed: false, error }), TestSessionStatus_1.SESSION_STATUS.FINISHED);
}

@@ -59,0 +59,0 @@ setSessionStartedTimeout(testRun, sessionId) {

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

import { TestSessionResult } from './TestSessionResult';
import { CoverageMapData } from 'istanbul-lib-coverage';
import { TestSessionStatus } from './TestSessionStatus';
export interface FailedImport {
file: string;
error: TestResultError;
}
export interface TestResultError {
message: string;
stack?: string;
expected?: string;
actual?: string;
}
export interface TestResult {
name: string;
passed: boolean;
error?: TestResultError;
}
export interface TestSession {

@@ -9,4 +24,10 @@ id: string;

status: TestSessionStatus;
result?: TestSessionResult;
passed?: boolean;
error?: TestResultError;
tests: TestResult[];
logs: string[];
failedImports: FailedImport[];
request404s: string[];
testCoverage?: CoverageMapData;
}
//# sourceMappingURL=TestSession.d.ts.map
import { TestSession } from './TestSession';
import { TestSessionStatus } from './TestSessionStatus';
import { TestSessionResult } from './TestSessionResult';
import { EventEmitter } from '../utils/EventEmitter';

@@ -12,3 +11,3 @@ interface EventMap {

add(session: TestSession): void;
updateStatus(session: TestSession, status: TestSessionStatus, result?: Partial<TestSessionResult>): void;
updateStatus(session: TestSession, status: TestSessionStatus): void;
update(session: TestSession): void;

@@ -15,0 +14,0 @@ get(id: string): TestSession | undefined;

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

}
updateStatus(session, status, result = {}) {
const updatedSession = Object.assign(Object.assign({}, session), { status, result: Object.assign({ passed: false, logs: [], tests: [], failedImports: [], request404s: new Set(), error: undefined }, result) });
updateStatus(session, status) {
const updatedSession = Object.assign(Object.assign({}, session), { status });
this.update(updatedSession);

@@ -60,6 +60,6 @@ this.emit('session-status-updated', updatedSession);

passed() {
return this.filtered(s => { var _a; return (_a = s.result) === null || _a === void 0 ? void 0 : _a.passed; });
return this.filtered(s => s.passed);
}
failed() {
return this.filtered(s => { var _a; return !((_a = s.result) === null || _a === void 0 ? void 0 : _a.passed); });
return this.filtered(s => !s.passed);
}

@@ -66,0 +66,0 @@ }

{
"name": "@web/test-runner-core",
"version": "0.2.2",
"version": "0.2.3",
"publishConfig": {

@@ -25,3 +25,5 @@ "access": "public"

},
"files": ["dist"],
"files": [
"dist"
],
"dependencies": {

@@ -28,0 +30,0 @@ "istanbul-lib-coverage": "^3.0.0",

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