vitest-github-actions-reporter
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -64,3 +64,8 @@ var __defProp = Object.defineProperty; | ||
// src/stacktrace/stringify.ts | ||
var repositoryPrefixes = [`D:/a/`, `/home/runner/`]; | ||
var _a; | ||
var repository = ((_a = process.env.GITHUB_REPOSITORY) == null ? void 0 : _a.split("/")[1]) ?? ""; | ||
var repositoryPrefixes = [ | ||
`D:/a/${repository}/`, | ||
`/home/runner/work/${repository}/` | ||
]; | ||
var stringifyStacktrace = (stack, trimRepositoryPrefix) => { | ||
@@ -107,5 +112,5 @@ return stack.map((s) => { | ||
reportFiles(files) { | ||
var _a; | ||
var _a2; | ||
for (const file of files) { | ||
if ((_a = file.result) == null ? void 0 : _a.error) { | ||
if ((_a2 = file.result) == null ? void 0 : _a2.error) { | ||
this.reportSuiteError(file.filepath, file); | ||
@@ -117,6 +122,6 @@ } | ||
reportTasks(filename, tasks) { | ||
var _a; | ||
var _a2; | ||
for (const task of tasks) { | ||
if (task.type === "suite") { | ||
if ((_a = task.result) == null ? void 0 : _a.error) { | ||
if ((_a2 = task.result) == null ? void 0 : _a2.error) { | ||
this.reportSuiteError(filename, task); | ||
@@ -131,4 +136,4 @@ } | ||
reportSuiteError(filename, suite) { | ||
var _a, _b, _c; | ||
const stackTrace = this.parseStacktrace((_b = (_a = suite.result) == null ? void 0 : _a.error) == null ? void 0 : _b.stackStr); | ||
var _a2, _b, _c; | ||
const stackTrace = this.parseStacktrace((_b = (_a2 = suite.result) == null ? void 0 : _a2.error) == null ? void 0 : _b.stackStr); | ||
const position = this.getPositionFromError(filename, stackTrace); | ||
@@ -141,4 +146,4 @@ const message = this.createMessage(stackTrace); | ||
reportTest(filename, test) { | ||
var _a, _b, _c, _d; | ||
if (((_a = test.result) == null ? void 0 : _a.state) !== "fail") | ||
var _a2, _b, _c, _d; | ||
if (((_a2 = test.result) == null ? void 0 : _a2.state) !== "fail") | ||
return; | ||
@@ -145,0 +150,0 @@ const stackTrace = this.parseStacktrace((_c = (_b = test.result) == null ? void 0 : _b.error) == null ? void 0 : _c.stackStr); |
{ | ||
"name": "vitest-github-actions-reporter", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Vitest reporter to create annotations when running tests in GitHub Actions", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35291
410
2