Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mocha-reporter-sonarqube

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-reporter-sonarqube - npm Package Compare versions

Comparing version 2.0.0 to 2.0.3

dist/lib/index.js.map

6

dist/lib/index.d.ts

@@ -1,6 +0,6 @@

import mocha from 'mocha';
declare class SonarQubeReporter extends mocha.reporters.Base {
import { type MochaOptions, type Runner, reporters } from 'mocha';
declare class SonarQubeReporter extends reporters.Base {
private tests;
private readonly options;
constructor(runner: mocha.Runner, options?: mocha.MochaOptions);
constructor(runner: Runner, options?: MochaOptions);
private readonly _onStreamError;

@@ -7,0 +7,0 @@ private readonly _onStart;

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const mocha_1 = __importDefault(require("mocha"));
const fs_1 = require("fs");
const stream_1 = require("stream");
/* eslint-disable class-methods-use-this */
const node_fs_1 = require("node:fs");
const node_stream_1 = require("node:stream");
const mocha_1 = require("mocha");
const xmldom_1 = require("@xmldom/xmldom");
class SonarQubeReporter extends mocha_1.default.reporters.Base {
class SonarQubeReporter extends mocha_1.reporters.Base {
constructor(runner, options) {

@@ -24,5 +22,7 @@ super(runner, options);

if (this.tests[file] === undefined) {
this.tests[file] = [];
this.tests[file] = [test];
}
this.tests[file].push(test);
else {
this.tests[file].push(test);
}
}

@@ -53,3 +53,3 @@ };

// istanbul ignore else
if (options && options.reporterOptions && typeof options.reporterOptions === 'object') {
if (options?.reporterOptions && typeof options.reporterOptions === 'object') {
const reporterOptions = options.reporterOptions;

@@ -68,5 +68,5 @@ this.options = {

// istanbul ignore if
if (!this.options.stream || !(this.options.stream instanceof stream_1.Writable)) {
if (!this.options.stream || !(this.options.stream instanceof node_stream_1.Writable)) {
if (this.options.filename) {
this.options.stream = (0, fs_1.createWriteStream)(this.options.filename, { encoding: 'utf-8', mode: 0o644 });
this.options.stream = (0, node_fs_1.createWriteStream)(this.options.filename, { encoding: 'utf-8', mode: 0o644 });
}

@@ -84,3 +84,2 @@ else {

static _generateTestCaseTag(doc, test) {
var _a, _b;
const testCase = doc.createElement('testCase');

@@ -94,4 +93,4 @@ testCase.setAttribute('name', test.titlePath().join(' » '));

const failure = doc.createElement('failure');
failure.setAttribute('message', /* istanbul ignore next */ ((_a = test.err) === null || _a === void 0 ? void 0 : _a.message) || '');
failure.appendChild(doc.createTextNode(/* istanbul ignore next */ ((_b = test.err) === null || _b === void 0 ? void 0 : _b.stack) || ''));
failure.setAttribute('message', /* istanbul ignore next */ test.err?.message ?? '');
failure.appendChild(doc.createTextNode(/* istanbul ignore next */ test.err?.stack ?? ''));
testCase.appendChild(failure);

@@ -108,1 +107,2 @@ } /* istanbul ignore else */

module.exports = SonarQubeReporter;
//# sourceMappingURL=index.js.map
{
"name": "mocha-reporter-sonarqube",
"version": "2.0.0",
"version": "2.0.3",
"main": "dist/lib/index.js",

@@ -8,4 +8,4 @@ "scripts": {

"lint": "eslint .",
"test": "mocha",
"test:coverage": "nyc mocha",
"test": "mocha test",
"test:coverage": "nyc mocha test",
"prepack": "npm run build"

@@ -28,24 +28,18 @@ },

"devDependencies": {
"@myrotvorets/buffer-stream": "^1.3.1",
"@myrotvorets/eslint-config-myrotvorets-ts": "^2.5.0",
"@types/chai": "^4.2.16",
"@types/mocha": "^9.0.0",
"@types/node": "^16.0.2",
"@typescript-eslint/eslint-plugin": "^4.14.2",
"chai": "^4.3.4",
"eslint": "^7.24.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-sonarjs": "^0.10.0",
"mocha": "^9.0.0",
"mocha-github-actions-reporter": "^0.2.3",
"@myrotvorets/buffer-stream": "^1.3.4",
"@myrotvorets/eslint-config-myrotvorets-ts": "^2.21.0",
"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.2",
"@types/node": "^20.8.3",
"chai": "^4.3.10",
"eslint-plugin-mocha": "^10.2.0",
"mocha": "^10.2.0",
"mocha-reporter-gha": "^1.1.0",
"nyc": "^15.1.0",
"prettier": "^2.2.1",
"ts-node": "^10.0.0",
"typescript": "^4.1.3"
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
},
"description": "Mocha reported for SonarQube",
"description": "Mocha reporter for SonarQube",
"dependencies": {
"@xmldom/xmldom": "^0.7.3"
"@xmldom/xmldom": "^0.8.0"
},

@@ -52,0 +46,0 @@ "repository": {

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