mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:27:35 +00:00
LibJS: Make AggregateError inherit from Error
This is our way of implementing the [[ErrorData]] internal slot, which is being used in Object.prototype.toString().
This commit is contained in:
parent
0e8cbfb7b5
commit
c503a28e19
3 changed files with 7 additions and 4 deletions
|
@ -10,6 +10,8 @@ test("result for various object types", () => {
|
|||
expect(oToString([])).toBe("[object Array]");
|
||||
expect(oToString(function () {})).toBe("[object Function]");
|
||||
expect(oToString(new Error())).toBe("[object Error]");
|
||||
expect(oToString(new TypeError())).toBe("[object Error]");
|
||||
expect(oToString(new AggregateError([]))).toBe("[object Error]");
|
||||
expect(oToString(new Boolean())).toBe("[object Boolean]");
|
||||
expect(oToString(new Number())).toBe("[object Number]");
|
||||
expect(oToString(new Date())).toBe("[object Date]");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue