diff --git a/test/built-ins/Set/prototype/isDisjointFrom/set-like-class-order.js b/test/built-ins/Set/prototype/isDisjointFrom/set-like-class-order.js index acec5cd1b1b..11306e1bc41 100644 --- a/test/built-ins/Set/prototype/isDisjointFrom/set-like-class-order.js +++ b/test/built-ins/Set/prototype/isDisjointFrom/set-like-class-order.js @@ -93,8 +93,6 @@ class MySetLike { "ToNumber(size)", "getting has", "getting keys", - "calling keys", - "getting next", // two calls to has "calling has", "calling has", @@ -117,8 +115,6 @@ class MySetLike { "ToNumber(size)", "getting has", "getting keys", - "calling keys", - "getting next", // three calls to has "calling has", "calling has", diff --git a/test/built-ins/Set/prototype/isSubsetOf/set-like-class-order.js b/test/built-ins/Set/prototype/isSubsetOf/set-like-class-order.js index 035ba5eeabe..57064af4b01 100644 --- a/test/built-ins/Set/prototype/isSubsetOf/set-like-class-order.js +++ b/test/built-ins/Set/prototype/isSubsetOf/set-like-class-order.js @@ -47,7 +47,7 @@ class MySetLike { "ToNumber(size)", "getting has", "getting keys", - // one calls to has + // one call to has "calling has", ]; diff --git a/test/built-ins/Set/prototype/union/set-like-class-order.js b/test/built-ins/Set/prototype/union/set-like-class-order.js index 202a1d8ecf9..1b3a0539d3c 100644 --- a/test/built-ins/Set/prototype/union/set-like-class-order.js +++ b/test/built-ins/Set/prototype/union/set-like-class-order.js @@ -57,6 +57,30 @@ class MySetLike { } } +const expectedOrder = [ + "getting size", + "ToNumber(size)", + "getting has", + "getting keys", + "calling keys", + "getting next", + // first iteration, has value + "calling next", + "getting done", + "getting value", + // second iteration, has value + "calling next", + "getting done", + "getting value", + // third iteration, has value + "calling next", + "getting done", + "getting value", + // fourth iteration, no value; ends + "calling next", + "getting done", +]; + // this is smaller than argument { observedOrder = []; @@ -65,30 +89,6 @@ class MySetLike { const s2 = new MySetLike(); const combined = s1.union(s2); - const expectedOrder = [ - "getting size", - "ToNumber(size)", - "getting has", - "getting keys", - "calling keys", - "getting next", - // first iteration, has value - "calling next", - "getting done", - "getting value", - // second iteration, has value - "calling next", - "getting done", - "getting value", - // third iteration, has value - "calling next", - "getting done", - "getting value", - // fourth iteration, no value; ends - "calling next", - "getting done", - ]; - assert.compareArray([...combined], ["a", "d", "b", "c"]); assert.compareArray(observedOrder, expectedOrder); } @@ -101,30 +101,6 @@ class MySetLike { const s2 = new MySetLike(); const combined = s1.union(s2); - const expectedOrder = [ - "getting size", - "ToNumber(size)", - "getting has", - "getting keys", - "calling keys", - "getting next", - // first iteration, has value - "calling next", - "getting done", - "getting value", - // second iteration, has value - "calling next", - "getting done", - "getting value", - // third iteration, has value - "calling next", - "getting done", - "getting value", - // fourth iteration, no value; ends - "calling next", - "getting done", - ]; - assert.compareArray([...combined], ["a", "b", "d", "c"]); assert.compareArray(observedOrder, expectedOrder); } @@ -137,30 +113,6 @@ class MySetLike { const s2 = new MySetLike(); const combined = s1.union(s2); - const expectedOrder = [ - "getting size", - "ToNumber(size)", - "getting has", - "getting keys", - "calling keys", - "getting next", - // first iteration, has value - "calling next", - "getting done", - "getting value", - // second iteration, has value - "calling next", - "getting done", - "getting value", - // third iteration, has value - "calling next", - "getting done", - "getting value", - // fourth iteration, no value; ends - "calling next", - "getting done", - ]; - assert.compareArray([...combined], ["a", "b", "d", "e", "c"]); assert.compareArray(observedOrder, expectedOrder); }