diff --git a/Userland/Libraries/LibJS/Tests/test-common.js b/Userland/Libraries/LibJS/Tests/test-common.js index b02c9cb287..a43477902e 100644 --- a/Userland/Libraries/LibJS/Tests/test-common.js +++ b/Userland/Libraries/LibJS/Tests/test-common.js @@ -280,7 +280,13 @@ class ExpectationError extends Error { toEqual(value) { this.__doMatcher(() => { - this.__expect(deepEquals(this.target, value)); + this.__expect( + deepEquals(this.target, value), + () => + `Expected _${valueToString(value)}_, but got _${valueToString( + this.target + )}_` + ); }); }