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

@diffblue/java-combiner

Package Overview
Dependencies
Maintainers
5
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@diffblue/java-combiner - npm Package Compare versions

Comparing version 0.1.5-rc2 to 0.1.5-rc4

6

build/combineTests.js

@@ -82,11 +82,9 @@ "use strict";

const reservedShortNames = new Set(existingImports.map(simpleClassName));
const classRules = new Set();
let imports = [];
let staticImports = [];
const testMethods = [];
let classRules = new Set();
for (const test of standardisedTests) {
if (test.classRules) {
test.classRules.forEach((i) => {
classRules.add(i);
});
classRules = new Set([...classRules, ...test.classRules]);
}

@@ -93,0 +91,0 @@ if (test.imports) {

@@ -106,14 +106,13 @@ "use strict";

}
if (classRules.size > 0 && (testImports.indexOf('org.junit.Rule') === -1)) {
if (classRules.size && !testImports.includes('org.junit.Rule')) {
testImports.push('org.junit.Rule');
}
let rulesString = '';
for (const s of combinedTests.classRules) {
rulesString = rulesString + ' ' + s.replace(/^(@[\w.]+)\s+/, ' $1\n ') + '\n\n';
let rules = '';
// map the rules. Add a newline after the @rule and indent both lines
const mapRules = Array.from(combinedTests.classRules).map((rule) => ' ' + rule.replace(/^(@[\w.]+)\s+/, ' $1\n '));
rules = mapRules.join('\n\n');
rules = combineTests_1.shortenClassNames({ imports: testImports, body: rules });
if (rules !== '') {
rules = '\n' + rules + '\n';
}
rulesString = rulesString.slice(0, -2);
rulesString = combineTests_1.shortenClassNames({ imports: testImports, body: rulesString });
if (rulesString !== '') {
rulesString = '\n' + rulesString + '\n';
}
if (!staticImports) {

@@ -129,3 +128,3 @@ staticImports = [];

public class ${classNameModified} {
${rulesString}
${rules}
${content}

@@ -132,0 +131,0 @@ }

{
"name": "@diffblue/java-combiner",
"description": "Java test combining library",
"version": "0.1.5-rc2",
"version": "0.1.5-rc4",
"main": "build/index.js",

@@ -6,0 +6,0 @@ "types": "build/index.d.ts",

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