Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

ghost-axe

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghost-axe

Test helper methods when using ghostjs & aXe

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
20
-54.55%
Maintainers
4
Weekly downloads
 
Created
Source

ghost-axe

npm version

Test helper methods when using ghostjs & aXe

Example usage

import assert from 'assert';
import ghost from 'ghostjs';
import ghostAxe from 'ghost-axe';

const initGhostAxe = async () => {
  await ghostAxe.init(ghost);
};

describe('Icon > a11y', () => {
  before(initGhostAxe);
  it('Loads at least 5 icons on the test page', async () => {
    await ghost.open('http://localhost:3000/a11y/icon');

    const svgIcons = await ghost.findElements('svg');
    assert.ok(svgIcons.length >= 5);
  });

  it('Does not have any a11y issues', async () => {
    const results = await ghostAxe.getResults();

    assert(results.violations.length === 0, ghostAxe.beautifyErrors(results));
  });
});

Keywords

Ghostjs

FAQs

Package last updated on 15 Dec 2016

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