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

@empiricalrun/reporter

Package Overview
Dependencies
Maintainers
0
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@empiricalrun/reporter - npm Package Compare versions

Comparing version 0.21.3 to 0.21.4

6

CHANGELOG.md
# @empiricalrun/reporter
## 0.21.4
### Patch Changes
- 33c6c28: feat: add unique tests to playwright report summary
## 0.21.3

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

1

dist/sources/base.d.ts
export type Results = {
hasPassed: boolean;
totalTests: number;
uniqueTests: number;
flakyTests: number;

@@ -5,0 +6,0 @@ skippedTests: number;

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

import { JSONReport as PlaywrightJSONReport } from "@playwright/test/reporter";
import { BaseReportSource, FailedTestWithLink, Results } from "./base";

@@ -15,2 +16,3 @@ type PlaywrightReportFilter = {

resultsSummary(): Results;
uniqueTests(results: PlaywrightJSONReport): number;
getTestIdForTestName(testName: string): string;

@@ -17,0 +19,0 @@ hasRunFailed(): boolean;

@@ -34,2 +34,3 @@ "use strict";

totalTests: results.stats.expected + results.stats.unexpected + results.stats.flaky,
uniqueTests: this.uniqueTests(results),
runDuration: results.stats.duration,

@@ -44,2 +45,23 @@ runStartedAt: results.stats.startTime,

}
uniqueTests(results) {
function buildSet(set, suite) {
const { specs, suites } = suite;
specs
.filter(({ tests }) => tests && tests.some((t) => t.status != "skipped"))
.forEach(({ file, line }) => {
set.add(`${file}:${line}`);
});
if (suites) {
suites.forEach((suite) => {
buildSet(set, suite);
});
}
}
const fileAndLineNumbers = new Set();
const { suites } = results;
suites.map((fileLevelSuite) => {
buildSet(fileAndLineNumbers, fileLevelSuite);
});
return fileAndLineNumbers.size;
}
getTestIdForTestName(testName) {

@@ -46,0 +68,0 @@ const results = (0, utils_1.parseJsonReport)(this.srcFile);

2

package.json
{
"name": "@empiricalrun/reporter",
"version": "0.21.3",
"version": "0.21.4",
"publishConfig": {

@@ -5,0 +5,0 @@ "registry": "https://registry.npmjs.org/",

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