jest-github-actions
Advanced tools
Comparing version 0.3.0 to 0.4.0
12
index.js
#!/usr/bin/env node | ||
const {issueCommand} = require("@actions/core/lib/command"); | ||
import { issueCommand } from "@actions/core/lib/command.js"; | ||
const cwd = new RegExp(process.cwd() + "/", "g"); | ||
const regex = /^ at .*?\(?([^\s:]+):(\d+):(\d+)\)?$/; | ||
class GitHubActionsReporter { | ||
onTestResult(_test, {testResults}) { | ||
for (const {failureMessages, fullName, status} of testResults) { | ||
export default class GitHubActionsReporter { | ||
onTestResult(_test, { testResults }) { | ||
for (const { failureMessages, fullName, status } of testResults) { | ||
if (status !== "failed") continue; | ||
@@ -20,3 +20,3 @@ for (const message of failureMessages) { | ||
const [, file, line, col] = match; | ||
issueCommand("error", {file, line, col}, `${fullName}\n\n${local}`); | ||
issueCommand("error", { file, line, col }, `${fullName}\n\n${local}`); | ||
} | ||
@@ -26,3 +26,1 @@ } | ||
} | ||
module.exports = GitHubActionsReporter; |
{ | ||
"name": "jest-github-actions", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Jest reporter for GitHub Actions annotations", | ||
"type": "module", | ||
"main": "index.js", | ||
@@ -6,0 +7,0 @@ "scripts": { |
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
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
Yes
2562
35