Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Less old-school array handling.

  • Loading branch information...
commit 4affe697bdd1819eed28166d18afe67721b86e68 1 parent d890100
Michelle Steigerwalt authored
Showing with 4 additions and 6 deletions.
  1. +2 −2 README.md
  2. +2 −4 tests/tests.js
4 README.md
View
@@ -139,7 +139,7 @@ test hooks.
bowties = 'cool';
},
beforeEach: function() {
- arr = [1,2,3];
+ arr = arr.concat(1,2,3);
},
afterEach: function() {
arr = [];
@@ -152,7 +152,7 @@ test hooks.
},
'arrays have three things': function() {
this.expect(arr.length, 3);
- arr[arr.length] = 5;
+ arr.push(5);
},
'arrays still have three things': function() {
this.expect(arr.length, 3);
6 tests/tests.js
View
@@ -124,9 +124,7 @@ describe("promise callback style", {
bowties = 'cool';
},
beforeEach: function() {
- arr[arr.length] = 1;
- arr[arr.length] = 2;
- arr[arr.length] = 3;
+ arr = arr.concat(1,2,3);
},
afterEach: function() {
arr = [];
@@ -139,7 +137,7 @@ describe("promise callback style", {
},
'arrays have three things [beforeEach]': function() {
this.expect(arr.length, 3);
- arr[arr.length] = 5;
+ arr.push(5);
},
'arrays still have three things [afterEach]': function() {
this.expect(arr.length, 3);
Please sign in to comment.
Something went wrong with that request. Please try again.