3.0.0 • Published 1 year ago

html-ut v3.0.0

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

HTML-UT (HTML Unit Testing)

An npm package that contains utility functions to assert HTML strings. Intended to be used in unit test to assert HTML element rendering reliably.

How to use this

Via npm execute: npm i html-ut --save-dev

Sample usage

Get hold of the string representation of an HTML element:

const htmlString = element.innerHTML;

Then minify the HTML string as follows

const minifiedHTMLString = minifyHTML(htmlString);

Full code of this sample

const minifyHTML = require('html-ut');

\\element declaration removed for brevity
const htmlString = element.innerHTML;
const minifiedHTMLString = minifyHTML(htmlString);
3.0.0

1 year ago

2.0.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago