Socket
Socket
Sign inDemoInstall

vitest-github-actions-reporter

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vitest-github-actions-reporter - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

23

dist/index.js

@@ -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

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