@a11ycore/utils

2.0.3 • Public • Published

@a11ycore/utils

npm version NPM

The utils package is used by other packages to mount string / html elements and normalise data for our builds

Usage

const utils = require('@a11ycore/utils');

describe("utils", () => {
  it("tests the mount function", () => {
    const html = `<p> hi there </p>`;
    const result = utils.mount(html);
    expect(typeof result[0]).toBe('object');
    expect(typeof result[1]).toBe('function');
  });
  it('should normalize the build', () => {
      const normal = utils.normaliseBuild('1234', yourResults);
      expect(normal.projectId).toBe('1234');
      expect(normal.issues.length).toBe(2);
      expect(normal.status).toBe('MODERATE');
  });
});

Readme

Keywords

none

Package Sidebar

Install

npm i @a11ycore/utils

Weekly Downloads

1

Version

2.0.3

License

MIT

Unpacked Size

6.11 kB

Total Files

4

Last publish

Collaborators

  • evanb54