
var n = 30;
while (n--) {
  describe('Array ' + n, function(){
    var arr;

    beforeEach(function(){
      arr = [1,2,3];
    })

    describe('#indexOf()', function(){
      it('should return -1 when the value is not present', function(){
        assert(-1 == arr.indexOf(5));
      })

      it('should return the correct index when the value is present', function(done){
        assert(0 == arr.indexOf(1));
        assert(1 == arr.indexOf(2));
        setTimeout(done, Math.random() * 200 | 0)
      })
    })
  })
}

var n = 30;
while (n--) {
  describe('Array ' + n, function(){
    var arr;

    beforeEach(function(){
      arr = [1,2,3];
    })

    describe('#indexOf()', function(){
      it('should return -1 when the value is not present', function(){
        assert(-1 == arr.indexOf(5));
      })

      it('should return the correct index when the value is present', function(done){
        assert(0 == arr.indexOf(1));
        assert(1 == arr.indexOf(2));
        setTimeout(function(){ done() }, Math.random() * 200 | 0)
      })
    })
  })
}
tweak large example