mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
LibJS: Change error message for non-objects in GetIteratorFlattenable
Matches other usages in e.g. Temporal now.
This commit is contained in:
parent
92fa1efc76
commit
705e96568c
3 changed files with 5 additions and 5 deletions
|
@ -2,7 +2,7 @@ describe("errors", () => {
|
|||
test("called with non-Object", () => {
|
||||
expect(() => {
|
||||
Iterator.from(Symbol.hasInstance);
|
||||
}).toThrowWithMessage(TypeError, "obj is not an object");
|
||||
}).toThrowWithMessage(TypeError, "Symbol(Symbol.hasInstance) is not an object");
|
||||
});
|
||||
|
||||
test("@@iterator is not callable", () => {
|
||||
|
@ -35,7 +35,7 @@ describe("errors", () => {
|
|||
|
||||
expect(() => {
|
||||
Iterator.from(iterable);
|
||||
}).toThrowWithMessage(TypeError, "iterator is not an object");
|
||||
}).toThrowWithMessage(TypeError, "Symbol(Symbol.hasInstance) is not an object");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ describe("errors", () => {
|
|||
expect(() => {
|
||||
const iterator = generator().flatMap(() => Symbol.hasInstance);
|
||||
iterator.next();
|
||||
}).toThrowWithMessage(TypeError, "obj is not an object");
|
||||
}).toThrowWithMessage(TypeError, "Symbol(Symbol.hasInstance) is not an object");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue