@actualwave/traceability-matrices
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "@actualwave/traceability-matrices", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"types": "dist/acorn.d.ts", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -47,13 +47,11 @@ const { resolve, join, basename } = require("path"); | ||
const readCoverage = async (paths, projects = {}) => { | ||
const roots = await readAll(paths); | ||
for (item of roots) { | ||
const { list } = item; | ||
await readDirectories(list, projects); | ||
} | ||
/** | ||
* Adds empty recorts for requirements found in structure and not presdent in records | ||
* Adds requiremnts to structure which were tested(present in records) but aren't presented there. | ||
* @param {Record<string, import("./coverage-records").Project>} globalProjects | ||
* @param {Record<string, import("./reader").FileWithProjects>} files | ||
*/ | ||
const normalize = (globalProjects, files) => { | ||
// generate missing structure pieces from records | ||
Object.values(projects).forEach((project) => { | ||
Object.values(globalProjects).forEach((project) => { | ||
const structReqs = getStructureLeafNodes(project.structure); | ||
@@ -67,5 +65,8 @@ Object.keys(project.records).forEach((req) => { | ||
const files = collectFiles(roots); | ||
// add empty records from structure for global projects | ||
Object.values(globalProjects).forEach(({ structure, records }) => | ||
addEmptyRecordsFromStructure(structure, records) | ||
); | ||
// add empty records from requirements found in structure | ||
// add empty records from requirements found in structure for partial projects | ||
Object.values(files).forEach(({ projects }) => | ||
@@ -76,3 +77,17 @@ Object.values(projects).forEach(({ global, records }) => | ||
); | ||
}; | ||
const readCoverage = async (paths, projects = {}) => { | ||
const roots = await readAll(paths); | ||
for (item of roots) { | ||
const { list } = item; | ||
await readDirectories(list, projects); | ||
} | ||
const files = collectFiles(roots); | ||
normalize(projects, files); | ||
return { roots, projects, files }; | ||
@@ -79,0 +94,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
982
35072
19