UNPKG

accessibility-checker

Version:

An automated testing tools for accessibility testing using Puppeteer, Selenium, or Zombie

65 lines 2.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.initializeSummary = void 0; /** * This function is responsible for initializing the summary object which will store all informations about the * scans that will occurs while karma is still running and running compliance scans. * * @return {Object} scanSummary - return the built scan summary object * * @memberOf this */ function initializeSummary(config) { // Variable Decleration var scanSummary = { counts: { ignored: 0, violation: undefined, review: undefined, recommendation: undefined, recommendationreview: undefined, pass: undefined }, startReport: Date.now(), endReport: 0, toolID: config.toolID, policies: config.policies.join(","), reportLevels: config.reportLevels, labels: config.label, failLevels: config.failLevels, // Add scanID (UUID) to the scan summary object scanID: config.scanID, // Build the paceScanSummary object which will contains all the items that were scanned and a count // summary for each of the scanned items. pageScanSummary: [] }; var reportLevels = config.reportLevels; // In the case that report levels are provided then populate the count object in // scanSummary.counts object with the levels which were provided in reportLevels // array. if (reportLevels) { // Iterate over the report levels and populate the pageResultsWithCount counts // object for (var _i = 0, reportLevels_1 = reportLevels; _i < reportLevels_1.length; _i++) { var level = reportLevels_1[_i]; scanSummary.counts[level] = 0; } ; scanSummary.counts.ignored = 0; } // Populate the scanSummary.counts object with all the levels else { scanSummary.counts = { violation: 0, review: 0, recommendation: 0, recommendationreview: 0, pass: 0, ignored: 0 }; } return scanSummary; } exports.initializeSummary = initializeSummary; ; //# sourceMappingURL=ReportUtil.js.map