Skip to content
Browse files

actual unit tests

  • Loading branch information...
1 parent cfd2fee commit a8052c794e87d2d40d300833844ce11c437e455f John Lindal committed May 15, 2012
Showing with 33 additions and 1 deletion.
  1. +33 −1 src/oop/tests/oop-test.js
View
34 src/oop/tests/oop-test.js
@@ -76,11 +76,43 @@ suite.add(new Y.Test.Case({
// should not throw
});
+ Y.each([1], function(v, k) {
+ count++;
+ });
+
Y.each({ foo: 1 }, function(v, k) {
count++;
});
- Assert.areEqual(1, count);
+ Assert.areEqual(2, count);
+ },
+
+ test_some: function () {
+ var count = 0;
+
+ Y.some(null, function(v, k) {
+ // should not throw
+ });
+
+ Y.some('string', function(v, k) {
+ // should not throw
+ });
+
+ Y.some(12345, function(v, k) {
+ // should not throw
+ });
+
+ Y.some([1,2], function(v, k) {
+ count++;
+ return v == 1;
+ });
+
+ Y.some({ foo: 1, bar: 2 }, function(v, k) {
+ count++;
+ return v == 1;
+ });
+
+ Assert.areEqual(2, count);
},
test_extend: function () {

0 comments on commit a8052c7

Please sign in to comment.
Something went wrong with that request. Please try again.