From afdba94f63abb3961afdcd33c9ce7f9f435a812b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 19 Apr 2020 14:51:20 +0200 Subject: [PATCH] LibJS: Fix expectations in the function-TypeError.js test They now match the new, more verbose error messages. --- Libraries/LibJS/Tests/function-TypeError.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Libraries/LibJS/Tests/function-TypeError.js b/Libraries/LibJS/Tests/function-TypeError.js index 8d63265f49..7ce8f888ed 100644 --- a/Libraries/LibJS/Tests/function-TypeError.js +++ b/Libraries/LibJS/Tests/function-TypeError.js @@ -7,7 +7,7 @@ try { assertNotReached(); } catch(e) { assert(e.name === "TypeError"); - assert(e.message === "true is not a function"); + assert(e.message === "true is not a function (evaluated from 'b')"); } try { @@ -16,7 +16,7 @@ try { assertNotReached(); } catch(e) { assert(e.name === "TypeError"); - assert(e.message === "123 is not a function"); + assert(e.message === "123 is not a function (evaluated from 'n')"); } try { @@ -25,7 +25,7 @@ try { assertNotReached(); } catch(e) { assert(e.name === "TypeError"); - assert(e.message === "undefined is not a function"); + assert(e.message === "undefined is not a function (evaluated from 'o.a')"); } try { @@ -33,7 +33,7 @@ try { assertNotReached(); } catch(e) { assert(e.name === "TypeError"); - assert(e.message === "[object MathObject] is not a function"); + assert(e.message === "[object MathObject] is not a function (evaluated from 'Math')"); } try { @@ -41,7 +41,7 @@ try { assertNotReached(); } catch(e) { assert(e.name === "TypeError"); - assert(e.message === "[object MathObject] is not a constructor"); + assert(e.message === "[object MathObject] is not a constructor (evaluated from 'Math')"); } try { @@ -49,7 +49,7 @@ try { assertNotReached(); } catch(e) { assert(e.name === "TypeError"); - assert(e.message === "function isNaN() {\n [NativeFunction]\n} is not a constructor"); + assert(e.message === "function isNaN() {\n [NativeFunction]\n} is not a constructor (evaluated from 'isNaN')"); } console.log("PASS");