/* global describe, it */

(function () {
  'use strict';

  describe('helper.js', function() {

    describe('Array.prototype.removeItem', function() {

      it('should be able to remove an existing item from an array', function() {
        var arr = [1,2,3,4,5];
        assert.equal(arr.removeItem(3), 3, 'should remove and return the given value');
        assert.equal(arr.removeItem(5), 5, 'should remove and return the given value');
        assert.equal(arr.toString(), [1,2,4].toString(), 'the array should exclude the removed values');
      });

      it('should return null when removing a non-existing item from an array', function() {
        var arr = [1,2,3,4,5];
        assert.equal(arr.removeItem(6), null, 'should return null');
        arr.removeItem(1);
        assert.equal(arr.removeItem(1), null, 'should return null');
      });

      it('should only remove one item at a time when duplicates exist in an array', function() {
        var arr = [1,2,3,2,4,2];
        assert.equal(arr.length, 6);
        arr.removeItem(2);
        assert.equal(arr.length, 5);
        arr.removeItem(2);
        assert.equal(arr.length, 4);
        assert.equal(arr.toString(), [1,3,4,2].toString());
      });

    });

    describe('Array.prototype.remove', function() {

      it('should be able to remove an item by index from an array', function() {
        var arr = ['a','b','c'];
        arr.remove(1);
        assert.equal(arr.toString(), ['a','c'].toString());
      });

    });

  });

})();

@@ -1502,14 +1502,444 @@
 %0A  %7D);%0A%0A
+  describe('storage.js', function() %7B%0A%0A    var storage = app.storage;%0A%0A    describe('storage.set', function() %7B%0A%0A      it('should be able to store string values in localStorage', function() %7B%0A        storage.set('hello', 'world');%0A        storage.set('pick', 'six');%0A%0A        assert.equal(window.localStorage.getItem('hello'), 'world');%0A        assert.equal(window.localStorage.getItem('pick'), 'six');%0A      %7D);%0A%0A    %7D);%0A%0A  %7D);%0A%0A
 %7D)();%0A

Add a storage.js test for storing strings.