Skip to content

Commit fd05df0

Browse files
authored
Merge pull request #357 from pan-no-mimi/bug-array-methods-task12
fix: test code (doesn't work)
2 parents 609ba18 + a8acec8 commit fd05df0

File tree

1 file changed

+3
-2
lines changed
  • 1-js/05-data-types/05-array-methods/12-reduce-object/_js.view

1 file changed

+3
-2
lines changed

1-js/05-data-types/05-array-methods/12-reduce-object/_js.view/test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ describe("groupById", function() {
88
];
99

1010
assert.deepEqual(groupById(users), {
11-
john: {id: 'john', name: "John Smith", age: 20}
11+
john: {id: 'john', name: "John Smith", age: 20},
1212
ann: {id: 'ann', name: "Ann Smith", age: 24},
1313
pete: {id: 'pete', name: "Pete Peterson", age: 31},
1414
});
1515
});
1616

1717
it("works with an empty array", function() {
18-
assert.deepEqual(groupById(users), {});
18+
let users_empty = [];
19+
assert.deepEqual(groupById(users_empty), {});
1920
});
2021
});

0 commit comments

Comments
 (0)