From 77c5128d4803858f0ad060c873929c1d48e669fa Mon Sep 17 00:00:00 2001 From: Sune Simonsen Date: Wed, 1 Jul 2015 23:03:14 +0200 Subject: [PATCH] Make unexpected-dom forward compatible with unexpected v9 --- lib/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index e836c1cd..ab1f007b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -180,7 +180,7 @@ function diffNodeLists(actual, expected, output, diff, inspect, equal) { module.exports = { name: 'unexpected-dom', installInto: function (expect) { - expect.output.installPlugin(require('magicpen-prism')); + expect.installPlugin(require('magicpen-prism')); var topLevelExpect = expect; expect.addType({ name: 'DOMNode', @@ -618,7 +618,7 @@ module.exports = { .sp() .annotationBlock(function () { if (promise && typeof expectedValueByAttributeName[attributeName] !== 'undefined') { - this.append(promise.reason().getErrorMessage()); + this.append(promise.reason().getErrorMessage(this)); } else { // onlyAttributes === true this.error('should be removed'); @@ -668,7 +668,7 @@ module.exports = { }); if (childrenError) { output.sp().annotationBlock(function () { - this.append(childrenError.getErrorMessage()); + this.append(childrenError.getErrorMessage(this)); if (childrenDiff && childrenDiff.diff) { this.nl(2).append(childrenDiff.diff); }