2017-01-10 18:02:20 -05:00
|
|
|
/* eslint-disable space-before-function-paren, no-var */
|
2016-11-23 10:54:35 -05:00
|
|
|
|
2017-01-09 18:23:54 -05:00
|
|
|
require('~/extensions/array');
|
2016-11-23 10:54:35 -05:00
|
|
|
|
|
|
|
(function() {
|
|
|
|
describe('Array extensions', function() {
|
|
|
|
describe('first', function() {
|
|
|
|
return it('returns the first item', function() {
|
|
|
|
var arr;
|
|
|
|
arr = [0, 1, 2, 3, 4, 5];
|
|
|
|
return expect(arr.first()).toBe(0);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
describe('last', function() {
|
|
|
|
return it('returns the last item', function() {
|
|
|
|
var arr;
|
|
|
|
arr = [0, 1, 2, 3, 4, 5];
|
|
|
|
return expect(arr.last()).toBe(5);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
2017-02-10 02:29:41 -05:00
|
|
|
}).call(window);
|