Permalink
Browse files

[test minor] Change `assert.length` to `assert.lengthOf`

`vows@0.5.12` changes syntax from `assert.length` to `assert.lengthOf`.
  • Loading branch information...
1 parent a74bf38 commit cce6eca7851ea845ce24b4a43aa79c9f606a6514 @mmalecki mmalecki committed Nov 8, 2011
Showing with 11 additions and 11 deletions.
  1. +11 −11 test/container-test.js
View
@@ -136,9 +136,9 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a list of files": function (err, files) {
assert.isArray(files);
- assert.length(files, 1);
+ assert.lengthOf(files, 1);
assert.isArray(testData.container.files);
- assert.length(testData.container.files, 1);
+ assert.lengthOf(testData.container.files, 1);
}
}
}
@@ -152,9 +152,9 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a list of files with content": function (err, files) {
assert.isArray(files);
- assert.length(files, 1);
+ assert.lengthOf(files, 1);
assert.isArray(testData.container.files);
- assert.length(testData.container.files, 1);
+ assert.lengthOf(testData.container.files, 1);
assert.isNotNull(files[0].local);
}
}
@@ -169,9 +169,9 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a list of files with content": function (err, files) {
assert.isArray(files);
- assert.length(files, 1);
+ assert.lengthOf(files, 1);
assert.isArray(testData.container.files);
- assert.length(testData.container.files, 1);
+ assert.lengthOf(testData.container.files, 1);
assert.isTrue(/^file/.test(files[0].name));
}
}
@@ -186,9 +186,9 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a empty list": function (err, files) {
assert.isArray(files);
- assert.length(files, 0);
+ assert.lengthOf(files, 0);
assert.isArray(testData.container.files);
- assert.length(testData.container.files, 0);
+ assert.lengthOf(testData.container.files, 0);
}
}
}
@@ -202,9 +202,9 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a list of files with content": function (err, files) {
assert.isArray(files);
- assert.length(files, 1);
+ assert.lengthOf(files, 1);
assert.isArray(testData.container.files);
- assert.length(testData.container.files, 1);
+ assert.lengthOf(testData.container.files, 1);
assert.equal(files[0].name, 'file1.txt');
}
}
@@ -219,7 +219,7 @@ vows.describe('node-cloudfiles/containers').addBatch({
},
"should response with a error": function (err, files) {
assert.isArray(err);
- assert.length(err, 1);
+ assert.lengthOf(err, 1);
assert.instanceOf(err[0], Error);
}
}

0 comments on commit cce6eca

Please sign in to comment.