From f2b5f3bca2bbe36414a277ab54641994084e2cfd Mon Sep 17 00:00:00 2001 From: muxator Date: Tue, 17 Jul 2018 00:46:52 +0200 Subject: [PATCH] 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:
Received:
--- tests/backend/specs/api/pad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/backend/specs/api/pad.js b/tests/backend/specs/api/pad.js index 1db90580..2a613ebf 100644 --- a/tests/backend/specs/api/pad.js +++ b/tests/backend/specs/api/pad.js @@ -538,7 +538,7 @@ describe('getHTML', function(){ .expect(function(res){ var ehtml = res.body.data.html.replace("
", "").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)