From bbbc23cd41aa897343ec558d95cb2d75ca6a34f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Wed, 30 Apr 2025 14:15:27 +0200 Subject: [PATCH] Don't test error messages in staging/sm --- harness/sm/non262-shell.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/harness/sm/non262-shell.js b/harness/sm/non262-shell.js index 06f067f566..f124b34057 100644 --- a/harness/sm/non262-shell.js +++ b/harness/sm/non262-shell.js @@ -140,9 +140,8 @@ allow_unused: True try { thunk(); } catch (e) { - if (e.message.indexOf(substr) !== -1) - return; - throw new Error("Expected error containing " + substr + ", got " + e); + // Do not test error messages + return; } throw new Error("Expected error containing " + substr + ", no exception thrown"); }; @@ -157,11 +156,8 @@ allow_unused: True if (!(exc instanceof ctor)) fullmsg = `Assertion failed: expected exception ${ctor.name}, got ${exc}`; else { - var result = check(exc.message); - if (!result) - fullmsg = `Assertion failed: expected exception with message, got ${exc}`; - else - return; + // Do not test error messages + return; } }