summaryrefslogtreecommitdiff
path: root/spec/javascripts/extensions/array_spec.js.coffee
blob: 4ceac619422869f0f2c420743fc44d9cc711bb6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#= require extensions/array

describe 'Array extensions', ->
  describe 'first', ->
    it 'returns the first item', ->
      arr = [0, 1, 2, 3, 4, 5]
      expect(arr.first()).toBe(0)

  describe 'last', ->
    it 'returns the last item', ->
      arr = [0, 1, 2, 3, 4, 5]
      expect(arr.last()).toBe(5)