mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:48:13 +00:00
LibJS: Throw TypeError when coercing symbol to number
This commit is contained in:
parent
476094922b
commit
4569e88bea
2 changed files with 8 additions and 9 deletions
|
@ -14,13 +14,12 @@ try {
|
|||
message: "Can't convert symbol to string",
|
||||
});
|
||||
|
||||
// FIXME: Uncomment when this doesn't assert
|
||||
// assertThrowsError(() => {
|
||||
// s1 + 1;
|
||||
// }, {
|
||||
// error: TypeError,
|
||||
// message: "Can't convert symbol to number",
|
||||
// });
|
||||
assertThrowsError(() => {
|
||||
s1 + 1;
|
||||
}, {
|
||||
error: TypeError,
|
||||
message: "Can't convert symbol to number",
|
||||
});
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue