topRankPerGroup
is a function.");'
- text: ''
testString: 'assert(typeof topRankPerGroup(-1, []) === "undefined", "topRankPerGroup
returns undefined on negative n values.");'
- text: ''
testString: 'assert.equal(res1[0][0].dept, "D050", "First department must be D050");'
- text: ''
testString: 'assert.equal(res1[0][1].salary, 21900, "First department must be D050");'
- text: ''
testString: 'assert.equal(res1[3][3].dept, "D202", "The last department must be D202");'
- text: ''
testString: 'assert.equal(res2[2].length, 1, "topRankPerGroup(1, ...)
must return only top ranking result per group.");'
- text: ''
testString: 'assert.equal(res3[2][1].name, "Maze Runner", "topRankPerGroup(1, ...)
must return only top ranking result per group.");'
```