mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 04:54:44 +02:00
Don't test error messages in staging/sm
This commit is contained in:
parent
a709831c8d
commit
bbbc23cd41
@ -140,9 +140,8 @@ allow_unused: True
|
|||||||
try {
|
try {
|
||||||
thunk();
|
thunk();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.message.indexOf(substr) !== -1)
|
// Do not test error messages
|
||||||
return;
|
return;
|
||||||
throw new Error("Expected error containing " + substr + ", got " + e);
|
|
||||||
}
|
}
|
||||||
throw new Error("Expected error containing " + substr + ", no exception thrown");
|
throw new Error("Expected error containing " + substr + ", no exception thrown");
|
||||||
};
|
};
|
||||||
@ -157,11 +156,8 @@ allow_unused: True
|
|||||||
if (!(exc instanceof ctor))
|
if (!(exc instanceof ctor))
|
||||||
fullmsg = `Assertion failed: expected exception ${ctor.name}, got ${exc}`;
|
fullmsg = `Assertion failed: expected exception ${ctor.name}, got ${exc}`;
|
||||||
else {
|
else {
|
||||||
var result = check(exc.message);
|
// Do not test error messages
|
||||||
if (!result)
|
return;
|
||||||
fullmsg = `Assertion failed: expected exception with message, got ${exc}`;
|
|
||||||
else
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user