You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 24, 2022. It is now read-only.
describe('Array',function(){before(function(){// ...});describe('#indexOf()',function(){context('when not present',function(){it('should not throw an error',function(){(function(){[1,2,3].indexOf(4);}).should.not.throw();});it('should return -1',function(){[1,2,3].indexOf(4).should.equal(-1);});});context('when present',function(){it('should return the index where the element first appears in the array',function(){[1,2,3].indexOf(3).should.equal(2);});});});});