Skip to content

Commit 89bcedd

Browse files
🧪 test: Use values in 3/4 cases.
Keep 1/4 case to cover iter/_iter.
1 parent d8a59ad commit 89bcedd

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

test/src/concat.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import test from 'ava';
22

3-
import {list, range, map} from '@aureooms/js-itertools';
3+
import {list, range} from '@aureooms/js-itertools';
44

55
import {str} from './_fixtures.js';
66

7-
import {from, concat, iter} from '../../src/index.js';
7+
import {from, concat, values} from '../../src/index.js';
88

99
function macro(t, A, B) {
1010
const _A = from(A);
1111
const _B = from(B);
1212
const _C = concat(_A, _B);
1313

1414
const expected = [].concat(A).concat(B);
15-
const result = list(map((x) => x.value, iter(_C)));
15+
const result = list(values(_C));
1616
t.deepEqual(expected, result);
1717
}
1818

test/src/pop.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import test from 'ava';
22

3-
import {list, range, map} from '@aureooms/js-itertools';
3+
import {list, range} from '@aureooms/js-itertools';
44

55
import {str} from './_fixtures.js';
66

7-
import {from, pop, iter} from '../../src/index.js';
7+
import {from, pop, values} from '../../src/index.js';
88

99
function throws(t, array) {
1010
const node = from(array);
@@ -18,7 +18,7 @@ function macro(t, array) {
1818
const node = from(array);
1919
const [after, last] = pop(node);
2020
t.is(array[array.length - 1], last.value);
21-
const result = list(map((x) => x.value, iter(after)));
21+
const result = list(values(after));
2222
t.deepEqual(array.slice(0, -1), result);
2323
}
2424

test/src/shift.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import test from 'ava';
22

3-
import {list, range, map} from '@aureooms/js-itertools';
3+
import {list, range} from '@aureooms/js-itertools';
44

55
import {str} from './_fixtures.js';
66

7-
import {from, shift, iter} from '../../src/index.js';
7+
import {from, shift, values} from '../../src/index.js';
88

99
function throws(t, array) {
1010
const node = from(array);
@@ -18,7 +18,7 @@ function macro(t, array) {
1818
const node = from(array);
1919
const [after, first] = shift(node);
2020
t.is(array[0], first.value);
21-
const result = list(map((x) => x.value, iter(after)));
21+
const result = list(values(after));
2222
t.deepEqual(array.slice(1), result);
2323
}
2424

0 commit comments

Comments
 (0)