mocha-github-actions-reporter
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -6,15 +6,12 @@ const core = require('@actions/core'); | ||
const { Spec } = mocha.reporters; | ||
const { EVENT_TEST_FAIL, EVENT_RUN_END } = mocha.Runner.constants; | ||
function GithubActionsReporter(runner, options) { | ||
Spec.call(this, runner, options); | ||
mocha.reporters.Spec.call(this, runner, options); | ||
const failures = []; | ||
runner.on(EVENT_TEST_FAIL, function(test) { | ||
runner.on(mocha.Runner.constants.EVENT_TEST_FAIL, function(test) { | ||
failures.push(test); | ||
}); | ||
runner.once(EVENT_RUN_END, function() { | ||
runner.once(mocha.Runner.constants.EVENT_RUN_END, function() { | ||
if (failures.length > 0) { | ||
@@ -42,4 +39,4 @@ core.startGroup('Mocha Annotations'); | ||
*/ | ||
mocha.utils.inherits(GithubActionsReporter, Spec); | ||
mocha.utils.inherits(GithubActionsReporter, mocha.reporters.Spec); | ||
module.exports = GithubActionsReporter; |
{ | ||
"name": "mocha-github-actions-reporter", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Report for mocha that outputs Github Actions annotations", | ||
"main": "index.js", | ||
"main": "lib/index.js", | ||
"author": "Daniel Lockyer", | ||
@@ -16,3 +16,3 @@ "repository": "https://github.com/daniellockyer/mocha-github-actions-reporter", | ||
"dependencies": { | ||
"@actions/core": "1.2.3" | ||
"@actions/core": "1.2.6" | ||
}, | ||
@@ -19,0 +19,0 @@ "devDependencies": { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
3918
6
57
+ Added@actions/core@1.2.6(transitive)
- Removed@actions/core@1.2.3(transitive)
Updated@actions/core@1.2.6