mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:08:13 +00:00
LibJS: Improve error messages for primitive strict mode property access
Using ErrorType::ReferencePrimitiveSetProperty the errors for primitives now look like "Cannot set property 'foo' of number '123'". The strict-mode-errors test has been adjusted and re-enabled.
This commit is contained in:
parent
b9c9315bcb
commit
eaf8c2e398
3 changed files with 19 additions and 15 deletions
|
@ -23,5 +23,5 @@ test("setting new properties on a symbol is an error in strict mode", () => {
|
|||
var symbol = Symbol("foo");
|
||||
expect(() => {
|
||||
symbol.bar = 42;
|
||||
}).toThrowWithMessage(TypeError, "Cannot set property 'bar' of Symbol(foo)");
|
||||
}).toThrowWithMessage(TypeError, "Cannot set property 'bar' of symbol 'Symbol(foo)'");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue