New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@empiricalrun/reporter

Package Overview
Dependencies
Maintainers
0
Versions
77
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.9.1 to 0.9.2

6

CHANGELOG.md
# @empiricalrun/reporter
## 0.9.2
### Patch Changes
- b45527e: feat: add browser name to failed tests if suite has cross-browser
## 0.9.1

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

5

dist/sources/playwright.d.ts

@@ -10,4 +10,4 @@ import { BaseReportSource, FailedTestWithLink, Platform, Results } from "./base";

private runId;
srcFile: string;
constructor(projectName: string, runId: string);
private srcFile;
constructor(projectName: string, runId: string, srcFile?: string);
platform(): Platform;

@@ -20,4 +20,5 @@ getSummaryReportUrl(): string;

private failedTestsFromSuite;
private hasCrossBrowserTests;
}
export {};
//# sourceMappingURL=playwright.d.ts.map

37

dist/sources/playwright.js

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

const base_1 = require("./base");
const defaultLocation = path_1.default.join(process.cwd(), "test-results", "summary.json");
class PlaywrightReportSource {
projectName;
runId;
srcFile = path_1.default.join(process.cwd(), "test-results", "summary.json");
constructor(projectName, runId) {
srcFile;
constructor(projectName, runId, srcFile = defaultLocation) {
this.projectName = projectName;
this.runId = runId;
this.srcFile = srcFile;
}

@@ -59,4 +61,11 @@ platform() {

});
return failedSpecs.map(({ title, id }) => {
return { name: title, link: this.reportLink({ testId: id }) };
return failedSpecs.map(({ title, id, tests }) => {
let projectNamePrefix = "";
if (this.hasCrossBrowserTests() && tests && tests.length > 0) {
projectNamePrefix = `[${tests[0].projectName}] `;
}
return {
name: `${projectNamePrefix}${title}`,
link: this.reportLink({ testId: id }),
};
});

@@ -91,3 +100,23 @@ }

}
hasCrossBrowserTests() {
const results = (0, utils_1.parseJsonReport)(this.srcFile);
const { config } = results;
// If there are multiple projects that have the same testDir, testMatch, testIgnore
const projects = config.projects.map(({ name, testDir, testIgnore, testMatch }) => {
const paths = {
testDir,
testMatch,
testIgnore,
};
return { name, hash: btoa(JSON.stringify(paths)) };
});
let commonHashes = [];
projects.forEach(({ hash }) => {
if (projects.filter((project) => project.hash === hash).length >= 2) {
commonHashes.push(hash);
}
});
return commonHashes.length > 0;
}
}
exports.PlaywrightReportSource = PlaywrightReportSource;
{
"name": "@empiricalrun/reporter",
"version": "0.9.1",
"version": "0.9.2",
"publishConfig": {

@@ -30,4 +30,6 @@ "registry": "https://registry.npmjs.org/",

"clean": "tsc --build --clean",
"lint": "eslint ."
"lint": "eslint .",
"test": "vitest run",
"test:watch": "vitest"
}
}

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