From b8612cf5bbd564963ae3ea72662b1920c3cb6755 Mon Sep 17 00:00:00 2001 From: Ameya Koshti Date: Fri, 12 Jun 2020 12:45:18 -0700 Subject: [PATCH] feat: add more to logs. skip document-title rule (#2) Co-authored-by: a0k00e3 --- index.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9c07aeb..aadd7ac 100644 --- a/index.js +++ b/index.js @@ -14,8 +14,12 @@ const createReport = violations => { return green('0 violations found'); } - const report = violations.reduce((acc, { nodes, help }, i) => { + const report = violations.reduce((acc, { nodes, help, helpUrl, tags, impact, id }, i) => { acc += red(`${i + 1}) ${help}\n`); + acc += red(`* ${helpUrl}\n`); + acc += red(`* ${tags.join(', ')}\n`); + acc += red(`* ${impact}\n`); + acc += red(`* ${id}\n`); acc += reset(nodes.reduce((e, { target }) => { const targetNodes = target.map((t) => `"${t}"`).join(', '); @@ -31,8 +35,11 @@ const createReport = violations => { }; -const axeCheck = async (t, context, options) => { +const axeCheck = async (t, context, options={}) => { try { + // skipping the "document-title" rule as there is an issue with testcafe + // being unable to find the title of a page inside the tag. + options = options["rules"]['document-title'] = {'enabled': false}; return await runAxe.with({ boundTestRun: t })(context, options); } catch (e) { return { error: e };