Skip to content

Commit 3a28ddc

Browse files
committed
add some tests
1 parent 7e52a66 commit 3a28ddc

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/unit-global/esnext.iterator.range.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ QUnit.test('Iterator.range', assert => {
3333
[MAX_SAFE_INTEGER, MAX_SAFE_INTEGER + 1],
3434
);
3535
assert.deepEqual(from(range(0, 0)), []);
36+
assert.deepEqual(from(range(0, 0, { step: 1, inclusive: true })), []);
3637
assert.deepEqual(from(range(0, -5, 1)), []);
3738

3839
assert.throws(() => range(NaN, 0), RangeError, 'NaN as start');
@@ -99,6 +100,7 @@ QUnit.test('Iterator.range', assert => {
99100
[BigInt('9007199254740991'), BigInt('9007199254740992')],
100101
);
101102
assert.deepEqual(from(range(BigInt(0), BigInt(0))), []);
103+
assert.deepEqual(from(range(BigInt(0), BigInt(0), { step: BigInt(1), inclusive: true })), []);
102104
assert.deepEqual(from(range(BigInt(0), BigInt(-5), BigInt(1))), []);
103105

104106
iterator = range(BigInt(1), BigInt(3));

tests/unit-pure/esnext.iterator.range.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ QUnit.test('Iterator.range', assert => {
3232
[MAX_SAFE_INTEGER, MAX_SAFE_INTEGER + 1],
3333
);
3434
assert.deepEqual(from(range(0, 0)), []);
35+
assert.deepEqual(from(range(0, 0, { step: 1, inclusive: true })), []);
3536
assert.deepEqual(from(range(0, -5, 1)), []);
3637

3738
assert.throws(() => range(NaN, 0), RangeError, 'NaN as start');
@@ -99,6 +100,7 @@ QUnit.test('Iterator.range', assert => {
99100
[BigInt('9007199254740991'), BigInt('9007199254740992')],
100101
);
101102
assert.deepEqual(from(range(BigInt(0), BigInt(0))), []);
103+
assert.deepEqual(from(range(BigInt(0), BigInt(0), { step: BigInt(1), inclusive: true })), []);
102104
assert.deepEqual(from(range(BigInt(0), BigInt(-5), BigInt(1))), []);
103105

104106
iterator = range(BigInt(1), BigInt(3));

0 commit comments

Comments
 (0)