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); }