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

@skills17/test-result-printer

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@skills17/test-result-printer - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0

2

lib/Printer.d.ts

@@ -14,4 +14,6 @@ import { TestRun } from '@skills17/test-result';

}): void;
private getPointsColor;
private printTotal;
private printWarnings;
private printTestWarning;
}

31

lib/Printer.js

@@ -44,13 +44,5 @@ "use strict";

const pointsText = `${points}/${maxPoints} point${maxPoints !== 1 ? 's' : ''}`;
let pointsColor = _chalk.green;
const pointsColor = this.getPointsColor(points, maxPoints);
let manualCheck = '';
if (points < maxPoints) {
if (points > 0) {
pointsColor = _chalk.yellow;
} else {
pointsColor = _chalk.red;
}
}
if (group.requiresManualCheck()) {

@@ -87,2 +79,6 @@ manualCheck = (0, _chalk.bold)((0, _chalk.yellow)(' [manual check required]'));

if (printFooter) {
if (printPoints) {
this.printTotal(printer);
}
printer(`\n${(0, _chalk.blue)('Info:')}`, 'The detailed test and error information is visible above the result summary.');

@@ -95,2 +91,19 @@ }

getPointsColor(points, maxPoints) {
if (points > 0) {
return points === maxPoints ? _chalk.green : _chalk.yellow;
}
return _chalk.red;
}
printTotal(printer) {
const totalPoints = this.run.getGroups().reduce((groupPoints, group) => groupPoints + group.getPoints(), 0);
const totalMaxPoints = this.run.getGroups().reduce((groupPoints, group) => groupPoints + group.getMaxPoints(), 0);
const totalPointsRounded = Math.round(totalPoints * 100) / 100;
const totalMaxPointsRounded = Math.round(totalMaxPoints * 100) / 100;
const totalPointsColor = this.getPointsColor(totalPoints, totalMaxPoints);
printer(`\nTotal: ${totalPointsColor(`${totalPointsRounded}/${totalMaxPointsRounded} point${totalMaxPointsRounded !== 1 ? 's' : ''}`)}`);
}
printWarnings(printer) {

@@ -97,0 +110,0 @@ // search for groups without tests

{
"name": "@skills17/test-result-printer",
"version": "2.1.2",
"version": "2.2.0",
"description": "Prints test results in a nice format to the console.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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