standard-html
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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:

screenshot

Readme

Keywords

none

Package Sidebar

Install

npm i standard-html

Weekly Downloads

24

Version

0.0.2

License

MIT

Unpacked Size

228 MB

Total Files

233

Last publish

Collaborators

  • abereghici