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

@actualwave/traceability-matrices

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@actualwave/traceability-matrices - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

commands/stats.js

49

cli.js

@@ -116,23 +116,32 @@ #!/usr/bin/env node

break;
case "threshold":
{
// threshold --total=80 --per-project=40
const total =
args["total"] === undefined ? 100 : parseInt(args["total"], 10);
const perProject =
args["per-project"] === undefined
? 100
: parseInt(args["per-project"], 10);
if (isNaN(total) || isNaN(perProject)) {
exitWithError(
"Coverage thresholds should be positive integer values between 0 and 100."
);
case "threshold":
{
// threshold --target-dir= --total=80 --per-project=40
const total =
args["total"] === undefined ? 100 : parseInt(args["total"], 10);
const perProject =
args["per-project"] === undefined
? 100
: parseInt(args["per-project"], 10);
if (isNaN(total) || isNaN(perProject)) {
exitWithError(
"Coverage thresholds should be positive integer values between 0 and 100."
);
}
const { threshold } = require("./commands/threshold.js");
threshold(targetDirs, total, perProject);
}
const { threshold } = require("./commands/threshold.js");
threshold(targetDirs, total, perProject);
}
break;
break;
case "stats":
{
// stats --target-dir=
const { stats } = require("./commands/stats.js");
stats(targetDirs);
}
break;
case "help":

@@ -139,0 +148,0 @@ // TODO

@@ -12,2 +12,3 @@ const { readCoverage } = require("../reader/reader");

const list = Object.values(projects);
let projectCount = list.length;
let error = false;

@@ -22,5 +23,13 @@ let combinedCoverage = 0;

calculateProjectStats(project);
const coverage = (requirementsCovered / requirementsTotal) * 100;
combinedCoverage += coverage;
const coverage = requirementsTotal
? (requirementsCovered / requirementsTotal) * 100
: 100;
if (requirementsTotal) {
combinedCoverage += coverage;
} else {
// exclude empty projects from total coverage calculation
projectCount--;
}
const str = `${coverage.toFixed(0).padStart(4, " ")}% - ${project.title}`;

@@ -37,3 +46,3 @@

const totalCoverage = combinedCoverage / list.length;
const totalCoverage = combinedCoverage / projectCount;
const str = `${totalCoverage.toFixed(0).padStart(4, " ")}% - Global coverage`;

@@ -40,0 +49,0 @@

{
"name": "@actualwave/traceability-matrices",
"version": "0.0.9",
"version": "0.0.10",
"types": "cypress.d.ts",

@@ -5,0 +5,0 @@ "bin": {

@@ -114,2 +114,11 @@ # @actualwave/traceability-matrices

### traceability-matrices stats
Outputs coverage information per project with requirements.
Example:
```
traceability-matrices stats --target-dir=cypress/coverage
```
## Cypress integration

@@ -116,0 +125,0 @@

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