Skip to content

alfa-test-utils 0.73.4

Install from the command line:
Learn more about npm packages
$ npm install @siteimprove/alfa-test-utils@0.73.4
Install via package.json:
"@siteimprove/alfa-test-utils": "0.73.4"

About this version

alfa-test-utils

Utilities for running Alfa locally and uploading results to the Siteimprove Intelligence Platform.

Installation

Alfa is distributed as npm packages in the Github registry. See Github documentation on the npm registry for configuring your package manager to use the Github registry for the @siteimprove organisation.

$ npm install --save-dev @siteimprove/alfa-test-utils

or

$ yarn add --dev @siteimprove/alfa-test-utils

Basic usage

Use scraper packages such as @siteimprove/alfa-playwright to grab a page, then a simple test script could look like this:

import { Audit, Rules, SIP } from "@siteimprove/alfa-test-utils";

Audit.run(page, { rules: { include: Rules.aaFilter } }).then((outcomes) => {
  SIP.upload(outcomes, {
    userName: process.env.SI_USERNAME,
    apiKey: process.env.SI_API_KEY,
    testName: "WCAG 2.2 AA conformance test",
  }).then(console.log);
});

See the full documentation for detailed usage instructions.

Details


Assets

  • alfa-test-utils-0.73.4.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0