Skip to content

Commit

Permalink
Merge pull request #2358 from captbaritone/test-cleanups-initial
Browse files Browse the repository at this point in the history
Cleanup assertion descriptions for _.initial()
  • Loading branch information
jridgewell committed Nov 24, 2015
2 parents feb4cb3 + c6e0658 commit 19b1e46
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/arrays.js
Expand Up @@ -45,13 +45,13 @@
});

test('initial', function(assert) {
assert.deepEqual(_.initial([1, 2, 3, 4, 5]), [1, 2, 3, 4], 'working initial()');
assert.deepEqual(_.initial([1, 2, 3, 4], 2), [1, 2], 'initial can take an index');
assert.deepEqual(_.initial([1, 2, 3, 4], 6), [], 'initial can take a large index');
assert.deepEqual(_.initial([1, 2, 3, 4, 5]), [1, 2, 3, 4], 'returns all but the last element');
assert.deepEqual(_.initial([1, 2, 3, 4], 2), [1, 2], 'returns all but the last n elements');
assert.deepEqual(_.initial([1, 2, 3, 4], 6), [], 'returns an empty array when n > length');
var result = (function(){ return _(arguments).initial(); }(1, 2, 3, 4));
assert.deepEqual(result, [1, 2, 3], 'initial works on arguments object');
assert.deepEqual(result, [1, 2, 3], 'works on an arguments object');
result = _.map([[1, 2, 3], [1, 2, 3]], _.initial);
assert.deepEqual(_.flatten(result), [1, 2, 1, 2], 'initial works with _.map');
assert.deepEqual(_.flatten(result), [1, 2, 1, 2], 'works well with _.map');
});

test('last', function(assert) {
Expand Down

0 comments on commit 19b1e46

Please sign in to comment.