New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@qualweb/earl-reporter

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qualweb/earl-reporter

Qualweb earl reporter

  • 0.0.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
118
decreased by-27.16%
Maintainers
1
Weekly downloads
 
Created
Source

QualWeb EARL reporter

EARL reporter module for QualWeb.

How to install

  $ npm i @qualweb/earl-reporter --save

How to run

Additional packages

  $ npm i @qualweb/get-dom-puppeteer --save

  $ npm i @qualweb/act-rules --save
  'use strict';

  const { getDom } = require('@qualweb/get-dom-puppeteer');
  const { executeACTR } = require('@qualweb/act-rules');
  const reporter = require('@qualweb/earl-reporter');

  (async () => {
    // Generate EARL assertions in case of partial report is given
    const dom = await getDom('https://act-rules.github.io/pages/about/');
    const report = await executeACTR(dom.parsedSourceHTML, dom.parsedProcessedHTML);
    const assertions = await reporter.generateEarlAssertions(report);

    console.log(assertions);
    
    // Generate full single EARL report - based on only one test subject
    const dom = await getDom('https://act-rules.github.io/pages/about/');

    // Example evaluation report
    const evaluationReport = {
      type: 'evaluation',
      system: {
        name: 'QualWeb',
        description: 'Web accessibility evaluator',
        version: '3.0.0',
        homepage: 'http://qualweb.di.fc.ul.pt',
        date: 'current date',
        hash: 'some hash',
        url: {
          completeUrl: 'https://act-rules.github.io/pages/about/'
        },
        dom: {
          title: 'some title',
          elementCount: 456
        }
      },
      modules: {
        'act-rules': ACTRulesReport;
        'html-techniques': HTMLTechniquesReport;
        'css-techniques': CSSTechniquesReport;
      }
    };

    const earlReport = await report.generateSingleEarlReport(evaluationReport);

    console.log(earlReport);

    // Generate full aggregated EARL report - on report based on multiple test subjects

    const evaluations = [evaluationReport1, evaluationReport2, ...];

    const aggregatedEarlReport = await reporter.generateAggregatedEarlReport(evaluations);

    console.log(aggregatedEarlReport);
  })();

License

ISC

Keywords

FAQs

Package last updated on 18 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc