assert-html
Assert two HTML strings are equal. Similar to spok but for HTML. Use assert-snapshot if you want an automated workflow.
Usage
var assertHtml = var tape = var html =
Outputs:
TAP version 13# compare two DOM stringsok 1 <section>not ok 2 ·· hello world --- operator: equal expected: '·· hello world' actual: '·· hello planet' at: assertHtml (/Users/anon/src/shama/assert-html/index.js:59:13) ...ok 3 </section>ok 4 <div>ok 5 ·· <b>ok 6 ·· ·· hellook 7 ·· </b>ok 8 ·· planetok 9 </div> 1..9# tests 9# pass 8# fail 1
API
assertHtml(assert, actual, expected)
Assert two DOM strings are equal using a custom assert function. Calls
assert.equal()
method from the assert function.