assert-html-equal
v1.0.0
Published
Check if two HTML strings are identical in structure.
Downloads
320
Readme
assert-html-equal
Checks that two HTML strings are equal. The two strings are pretty-formatted before being compared, to ensure differences in whitespace, tabs, etc. don't mess up the comparison.
Usage
npm install assert-html-equal
var htmlEqual = require('assert-html-equal');
// Works great with multiline strings!
var actual = '<table></table>';
var expected = `
<table></table>
`;
var message = 'HTML output is correct';
htmlEqual(actual, expected, message);
Local Development
git clone https://github.com/gakimball/assert-html-equal
cd assert-html-equal
npm install
npm test