Permalink
Browse files

minor cleanup of new array test

  • Loading branch information...
1 parent 8f977aa commit ee5982ac6d7d375337a92aaf45871cfe22fa524c @rmurphey committed Sep 4, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 tests/app/arrays.js
View
@@ -27,14 +27,17 @@ define([
expect(result).to.have.length(3);
expect(result.join(' ')).to.be('1 3 4');
});
-
- it("you should be able to remove a value from an array (without making copy of original array)", function() {
- a.push(2); // Make sure the value appears more than one time
+
+ it("you should be able to remove a value from an array, returning the original array", function() {
+ a.push( 2 );
+
var result = answers.removeWithoutCopy(a, 2);
expect(result).to.have.length(3);
expect(result.join(' ')).to.be('1 3 4');
- expect(result).equal(a); //make sure that you return the same instance of array
+
+ // make sure that you return the same array instance
+ expect(result).equal(a);
});
it("you should be able to add an item to the end of an array", function() {

0 comments on commit ee5982a

Please sign in to comment.