Skip to content

Commit 333cb9d

Browse files
Fixed minor typos
The empty users array was undeclared in the second test, and the object in the first test was missing a comma in its declaration.
1 parent 77cb06d commit 333cb9d

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
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+
users = [];
1819
assert.deepEqual(groupById(users), {});
1920
});
2021
});

0 commit comments

Comments
 (0)