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

jest-sonar

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-sonar - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

20

__test__/reporter.spec.js

@@ -31,2 +31,22 @@ const Reporter = require('../src/reporter');

{
testFilePath: '/the/root/my-test/my-test.spec.js',
testResults: [
{
fullName: `Some crazy title with ${String.fromCharCode(
27
)}[31;1m red color ${String.fromCharCode(
27
)}[0m and 🔥`,
duration: 30,
failureMessages: []
},
{
fullName:
'When this is failing the sonar report should contain the failure',
duration: 10,
failureMessages: ['A failure']
}
]
},
{
testFilePath: '/the/root/my-second-test.spec.js',

@@ -33,0 +53,0 @@ testResults: [

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Changelog

### [0.2.2](https://github.com/sh33dafi/jest-sonar/compare/v0.2.1...v0.2.2) (2019-08-26)
### [0.2.1](https://github.com/sh33dafi/jest-sonar/compare/v0.2.0...v0.2.1) (2019-08-12)

@@ -7,0 +11,0 @@

9

package.json
{
"name": "jest-sonar",
"version": "0.2.1",
"version": "0.2.2",
"description": "A sonar reporter for jest",

@@ -22,3 +22,3 @@ "keywords": [

"devDependencies": {
"eslint": "^6.0.1",
"eslint": "^6.2.1",
"eslint-config-prettier": "^6.0.0",

@@ -30,3 +30,6 @@ "eslint-plugin-prettier": "^3.1.0",

},
"dependencies": {}
"dependencies": {
"entities": "2.0.0",
"strip-ansi": "5.2.0"
}
}

@@ -1,15 +0,7 @@

const map = {
'>': '>',
'<': '&lt;',
"'": '&apos;',
'"': '&quot;',
'&': '&amp;'
};
const entities = require('entities');
const stripAnsi = require('strip-ansi');
module.exports = function(value) {
if (value === null || value === undefined) return;
return value.replace(new RegExp('([&"<>\'])', 'g'), (str, item) => {
return map[item];
});
module.exports = value => {
if (typeof value !== 'string') return '';
return entities.encodeXML(stripAnsi(value));
};
const path = require('path');
const xml = require('xml');
const escape = require('./escape');

@@ -43,3 +42,5 @@

const buildTestCase = testCase =>
`<testCase name="${escape(testCase.name)}" duration="${escape(testCase.duration)}"`;
`<testCase name="${escape(testCase.name)}" duration="${escape(
testCase.duration
)}"`;
const buildFailure = failure =>

@@ -46,0 +47,0 @@ `<failure message="Error"><![CDATA[${failure}]]></failure>`;

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