UNPKG

systelab-components-wdio-test

Version:
25 lines (24 loc) 782 B
import { ReportUtility } from "./report.util.js"; export class TraceabilityUtility { static registerCoveredSpecs(specList) { this.addCoveredSpecs(specList); this.dumpCoveredSpecs(); this.clearCoveredSpecs(); } static addCoveredSpecs(specsList) { specsList.forEach(spec => this.coveredSpecs.add(spec)); } static clearCoveredSpecs() { this.coveredSpecs.clear(); } static dumpCoveredSpecs() { ReportUtility.addLabel("coveredSpecs", this.getCoveredSpecsPrettyString()); } static getCoveredSpecsPrettyString() { return [...this.coveredSpecs].sort().join(', '); } static hasCoveredSpecs() { return this.coveredSpecs.size > 0; } } TraceabilityUtility.coveredSpecs = new Set();