Add JS specs for Array extensions
This commit is contained in:
parent
4560954404
commit
39d5a4878f
1 changed files with 12 additions and 0 deletions
12
spec/javascripts/extensions/array_spec.js.coffee
Normal file
12
spec/javascripts/extensions/array_spec.js.coffee
Normal file
|
@ -0,0 +1,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)
|
Loading…
Reference in a new issue