mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +00:00
LibJS: Integrate iterator protocol into language features
Finally use Symbol.iterator protocol in language features :) currently only used in for-of loops and spread expressions, but will have more uses later (Maps, Sets, Array.from, etc).
This commit is contained in:
parent
4970c448bf
commit
a51b2393f2
8 changed files with 187 additions and 127 deletions
|
@ -200,7 +200,6 @@ class ExpectationError extends Error {
|
|||
|
||||
toContain(item) {
|
||||
this.__doMatcher(() => {
|
||||
// FIXME: Iterator check
|
||||
for (let element of this.target) {
|
||||
if (item === element) return;
|
||||
}
|
||||
|
@ -211,7 +210,6 @@ class ExpectationError extends Error {
|
|||
|
||||
toContainEqual(item) {
|
||||
this.__doMatcher(() => {
|
||||
// FIXME: Iterator check
|
||||
for (let element of this.target) {
|
||||
if (deepEquals(item, element)) return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue