Don't test error messages in staging/sm

This commit is contained in:
André Bargull 2025-04-30 14:15:27 +02:00 committed by Ms2ger
parent a709831c8d
commit bbbc23cd41

View File

@ -140,9 +140,8 @@ allow_unused: True
try {
thunk();
} catch (e) {
if (e.message.indexOf(substr) !== -1)
// Do not test error messages
return;
throw new Error("Expected error containing " + substr + ", got " + e);
}
throw new Error("Expected error containing " + substr + ", no exception thrown");
};
@ -157,10 +156,7 @@ 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
// Do not test error messages
return;
}
}