Skip to content

Commit f5c856f

Browse files
committed
Updating test file
1 parent 7eaf1be commit f5c856f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

exercises/practice/list-ops/list-ops.spec.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ describe('append entries to a list and return the new list', () => {
88
expect(list1.append(list2)).toEqual(new List());
99
});
1010

11+
xtest('list to empty list', () => {
12+
const list1 = new List();
13+
const list2 = new List([1, 2, 3, 4]);
14+
expect(list1.append(list2)).toEqual(list2);
15+
});
16+
1117
xtest('empty list to list', () => {
1218
const list1 = new List([1, 2, 3, 4]);
1319
const list2 = new List();
@@ -36,6 +42,15 @@ describe('concat lists and lists of lists into new list', () => {
3642
const listOfLists = new List([list2, list3, list4]);
3743
expect(list1.concat(listOfLists).values).toEqual([1, 2, 3, 4, 5, 6]);
3844
});
45+
46+
xtest('list of nested lists', () => {
47+
const list1 = new List([[1], [2]]);
48+
const list2 = new List([[3]]);
49+
const list3 = new List([[]]);
50+
const list4 = new List([[4, 5, 6]]);
51+
const listOfNestedLists = new List([list2, list3, list4]);
52+
expect(list1.concat(listOfNestedLists).values).toEqual([[1], [2], [3], [], [4, 5, 6]]);
53+
});
3954
});
4055

4156
describe('filter list returning only values that satisfy the filter function', () => {

0 commit comments

Comments
 (0)