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.
This commit is contained in:
parent
77cb06d6ac
commit
333cb9defc
1 changed files with 2 additions and 1 deletions
|
@ -8,13 +8,14 @@ describe("groupById", function() {
|
|||
];
|
||||
|
||||
assert.deepEqual(groupById(users), {
|
||||
john: {id: 'john', name: "John Smith", age: 20}
|
||||
john: {id: 'john', name: "John Smith", age: 20},
|
||||
ann: {id: 'ann', name: "Ann Smith", age: 24},
|
||||
pete: {id: 'pete', name: "Pete Peterson", age: 31},
|
||||
});
|
||||
});
|
||||
|
||||
it("works with an empty array", function() {
|
||||
users = [];
|
||||
assert.deepEqual(groupById(users), {});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue