axe-result-pretty-print
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -16,5 +16,5 @@ "use strict"; | ||
}); | ||
console.info(preparedData.violationsTotal); | ||
// Print summary of violations as a table | ||
if (preparedData.violationsSummaryTable.length !== 0) { | ||
console.info(preparedData.violationsTotal); | ||
if (!report.skipResultTable) { | ||
@@ -38,2 +38,2 @@ console.table(preparedData.violationsSummaryTable); | ||
exports.prettyPrintAxeReport = prettyPrintAxeReport; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkRBQXdEO0FBR3hEOzs7R0FHRztBQUNILFNBQWdCLG9CQUFvQixDQUFDLE1BQXVCO0lBQ3hELElBQUk7UUFDQSxNQUFNLFlBQVksR0FBRyxxQ0FBaUIsQ0FBQztZQUNuQyxVQUFVLEVBQUUsTUFBTSxDQUFDLFVBQVU7WUFDN0IsTUFBTSxFQUFFLE1BQU0sQ0FBQyxNQUFNO1lBQ3JCLEdBQUcsRUFBRSxNQUFNLENBQUMsR0FBRztTQUNsQixDQUFDLENBQUM7UUFDSCx5Q0FBeUM7UUFDekMsSUFBSSxZQUFZLENBQUMsc0JBQXNCLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtZQUNsRCxPQUFPLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxlQUFlLENBQUMsQ0FBQztZQUMzQyxJQUFJLENBQUMsTUFBTSxDQUFDLGVBQWUsRUFBRTtnQkFDekIsT0FBTyxDQUFDLEtBQUssQ0FBQyxZQUFZLENBQUMsc0JBQXNCLENBQUMsQ0FBQzthQUN0RDtZQUNELE9BQU8sQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLDBCQUEwQixDQUFDLENBQUM7U0FDekQ7UUFDRCxJQUFJLFlBQV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LENBQUMsQ0FBQzthQUN0RDtZQUNELE9BQU8sQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLDBCQUEwQixDQUFDLENBQUM7U0FDekQ7UUFDRCxJQUFJLFlBQVksQ0FBQyxtQkFBbUIsS0FBSyxFQUFFLEVBQUU7WUFDekMsT0FBTyxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsbUJBQW1CLENBQUMsQ0FBQztTQUNsRDtLQUNKO0lBQUMsT0FBTyxDQUFDLEVBQUU7UUFDUix3RUFBd0U7UUFDeEUsSUFBSSxDQUFDLFlBQVksU0FBUyxFQUFFO1lBQ3hCLE1BQU0sQ0FBQyxDQUFDO1NBQ1g7UUFDRCxPQUFPLENBQUMsR0FBRyxDQUFDLHdDQUF3QyxDQUFDLEVBQUUsQ0FBQyxDQUFDO0tBQzVEO0FBQ0wsQ0FBQztBQXpCRCxvREF5QkMifQ== |
@@ -17,3 +17,4 @@ import { SpecPreparedData, SpecReportInput } from './SpecReportTypes'; | ||
* @param passes | ||
* @param url | ||
*/ | ||
export declare function prepareReportData({ violations, passes, url }: SpecReportInput): SpecPreparedData; |
@@ -35,2 +35,3 @@ "use strict"; | ||
* @param passes | ||
* @param url | ||
*/ | ||
@@ -53,3 +54,3 @@ function prepareReportData({ violations, passes, url }) { | ||
return { | ||
violationsTotal: 'No accessibility violation were detected', | ||
violationsTotal: `No accessibility violation were detected${url ? ` for the ${url}` : ''}`, | ||
violationsSummaryTable: [], | ||
@@ -87,4 +88,3 @@ violationsDetailsFormatted: '', | ||
.join('\n')); | ||
return `${i + | ||
1}. ${axeRuleId}\t${learnMore}\n${name}\n${summary}\n${wcagRef}\n${nodeDetails}\n`; | ||
return `${i + 1}. ${axeRuleId}\t${learnMore}\n${name}\n${summary}\n${wcagRef}\n${nodeDetails}\n`; | ||
}) | ||
@@ -100,2 +100,2 @@ .join('\n'); | ||
exports.prepareReportData = prepareReportData; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjoz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HLElBQUksRUFBRSxDQUFDO1FBQzNDLE1BQU0sU0FBUyxHQUFHLEdBQUcsWUFBSSxDQUFDLGNBQWMsQ0FBQyxHQUFHLE9BQU8sRUFBRSxDQUFDO1FBQ3RELE1BQU0sV0FBVyxHQUFHLEdBQUcsWUFBSSxDQUFDLHVCQUF1QixDQUFDLElBQUksQ0FBQyxNQUFNLENBQzNELEtBQUs7YUFDQSxHQUFHLENBQUMsQ0FBQyxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUUsRUFBRSxFQUFFO1lBQ3RCLE1BQU0sV0FBVyxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLElBQUksSUFBSSxHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7WUFDakUsT0FBTyxlQUFlLFdBQVcsa0JBQWtCLElBQUksRUFBRSxDQUFDO1FBQzlELENBQUMsQ0FBQzthQUNELElBQUksQ0FBQyxJQUFJLENBQUMsQ0FDbEIsQ0FBQztRQUVGLE9BQU8sR0FDSCxDQUFDLEdBQUcsQ0FDUixLQUFLLFNBQVMsS0FBSyxTQUFTLEtBQUssSUFBSSxLQUFLLE9BQU8sS0FBSyxPQUFPLEtBQUssV0FBVyxJQUFJLENBQUM7SUFDdEYsQ0FBQyxDQUFDO1NBQ0QsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBRWhCLE9BQU87UUFDSCxlQUFlO1FBQ2Ysc0JBQXNCO1FBQ3RCLDBCQUEwQjtRQUMxQixtQkFBbUI7S0FDdEIsQ0FBQztBQUNOLENBQUM7QUF2RUQsOENBdUVDIn0= |
{ | ||
"name": "axe-result-pretty-print", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "The module allows to make readable output for aXe core accessibility results from raw aXe result object.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -15,5 +15,5 @@ import { prepareReportData } from './prepareReportData'; | ||
}); | ||
console.info(preparedData.violationsTotal); | ||
// Print summary of violations as a table | ||
if (preparedData.violationsSummaryTable.length !== 0) { | ||
console.info(preparedData.violationsTotal); | ||
if (!report.skipResultTable) { | ||
@@ -20,0 +20,0 @@ console.table(preparedData.violationsSummaryTable); |
@@ -37,2 +37,3 @@ import { bold } from 'chalk'; | ||
* @param passes | ||
* @param url | ||
*/ | ||
@@ -57,3 +58,5 @@ export function prepareReportData({ violations, passes, url }: SpecReportInput): SpecPreparedData { | ||
return { | ||
violationsTotal: 'No accessibility violation were detected', | ||
violationsTotal: `No accessibility violation were detected${ | ||
url ? ` for the ${url}` : '' | ||
}`, | ||
violationsSummaryTable: [], | ||
@@ -97,4 +100,5 @@ violationsDetailsFormatted: '', | ||
return `${i + | ||
1}. ${axeRuleId}\t${learnMore}\n${name}\n${summary}\n${wcagRef}\n${nodeDetails}\n`; | ||
return `${ | ||
i + 1 | ||
}. ${axeRuleId}\t${learnMore}\n${name}\n${summary}\n${wcagRef}\n${nodeDetails}\n`; | ||
}) | ||
@@ -101,0 +105,0 @@ .join('\n'); |
@@ -24,2 +24,8 @@ import { prettyPrintAxeReport } from '../src'; | ||
}); | ||
it('no violations', async () => { | ||
prettyPrintAxeReport({ | ||
violations: [], | ||
url: 'www.example.com', | ||
}); | ||
}); | ||
it('Verify throwing an error if violations are not passed', async () => { | ||
@@ -26,0 +32,0 @@ expect(() => { |
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
285829
6363