Skip to content

Commit 55e4c18

Browse files
anbaptomato
authored andcommitted
Replace "closed" global variable in Math.sumPrecise test
This allows running the test in browsers, too. <https://developer.mozilla.org/en-US/docs/Web/API/Window/closed>.
1 parent 29860b3 commit 55e4c18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/built-ins/Math/sumPrecise/throws-on-non-number.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ assert.throws(TypeError, function () {
4949
assert.sameValue(coercions, 0);
5050

5151
var nextCalls = 0;
52-
var closed = false;
52+
var returnCalls = 0;
5353
var iterator = {
5454
next: function () {
5555
++nextCalls;
5656
return { done: false, value: objectWithValueOf };
5757
},
5858
return: function () {
59-
closed = true;
59+
++returnCalls;
6060
return {};
6161
}
6262
};
@@ -71,4 +71,4 @@ assert.throws(TypeError, function () {
7171
});
7272
assert.sameValue(coercions, 0);
7373
assert.sameValue(nextCalls, 1);
74-
assert.sameValue(closed, true);
74+
assert.sameValue(returnCalls, 1);

0 commit comments

Comments
 (0)