tests: print expected & received output for 'getHTML'

This test was broken by #3268 (getLineHTMLForExport - Fixes #2486 but breaks
plugins). This change aims to facilitate debugging.

Expected:
<!doctype html><html><body><ul class="bullet"><li>one</li><li>2</li></ul><br><ul><ul class="bullet"><li>ul2</li></ul></ul></body></html>

Received:
<!doctype html><html><body><ul class="bullet"><li>one</li><li>2</ul><br><ul class="bullet"><li><ul class="bullet"><li>ul2</ul></li></ul></body></html>
This commit is contained in:
muxator 2018-07-17 00:46:52 +02:00
parent 7c971f24aa
commit f2b5f3bca2

View file

@ -538,7 +538,7 @@ describe('getHTML', function(){
.expect(function(res){
var ehtml = res.body.data.html.replace("<br></body>", "</body>").toLowerCase();
var uhtml = ULhtml.toLowerCase();
if(ehtml !== uhtml) throw new Error("Imported HTML does not match served HTML")
if(ehtml !== uhtml) throw new Error("Imported HTML does not match served HTML.\nExpected:\n" + uhtml + "\n\nReceived:\n" + ehtml)
})
.expect('Content-Type', /json/)
.expect(200, done)