0.0.2 • Published 1 year ago

standard-html v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Standard HTML - W3C Validator

Check if your HTML is compliant with W3C standards

Setup

Install package:

$ npm install --save-dev standard-html

Usage

Usage example using @testing-library/react and vitest

import { expect, test } from "vitest";
import { render } from "@testing-library/react";
import { validateMarkup } from "standard-html";

import App from "./App";

test("markup is valid", async () => {
  const { container } = render(<App />);

  const [violations, summary] = await validateMarkup(container);
  expect(violations).toEqual([]);
  expect(summary.length).toEqual(0);
});

Error output example:

0.0.2

1 year ago

0.0.1

1 year ago