debian-mirror-gitlab/spec/javascripts/extensions/array_spec.js

23 lines
574 B
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
/* eslint-disable space-before-function-paren, no-var */
2016-09-13 17:45:13 +05:30
2017-08-17 22:00:37 +05:30
require('~/extensions/array');
2016-09-13 17:45:13 +05:30
(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);
});
});
2017-08-17 22:00:37 +05:30
describe('last', function() {
2016-09-13 17:45:13 +05:30
return it('returns the last item', function() {
var arr;
arr = [0, 1, 2, 3, 4, 5];
return expect(arr.last()).toBe(5);
});
});
});
2017-08-17 22:00:37 +05:30
}).call(window);