You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mocha-github-actions-reporter

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version

to
0.2.2

11

lib/index.js

@@ -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": {