Permalink
Browse files

merging async test cases

  • Loading branch information...
1 parent 4dbc413 commit 3d50e7f6b399de97e84b6306a644b79adb620a89 @CatChen CatChen committed Dec 23, 2010
Showing with 22 additions and 2 deletions.
  1. +20 −0 test/javascripts/async.js
  2. +2 −2 test/javascripts/overload.js
@@ -23,6 +23,8 @@ function testAsync() {
ok(Function.prototype.asyncApply, "Function.prototype.asyncApple exists");
});
+ module("async operation");
+
test("async operation callback", function() {
expect(6);
@@ -188,6 +190,24 @@ function testAsync() {
}, asyncFunctionDelay * 3)
});
+ module("async chain");
+
+ test("sync chain go only operation", function() {
+ expect(1);
+
+ var syncFunctionDelay = 100;
+
+ stop();
+
+ var chain = Async
+ .go(0);
+
+ setTimeout(function() {
+ equals(chain.result, 0, "sync chain result")
+ start();
+ }, syncFunctionDelay);
+ });
+
test("sync chain go first operation", function() {
expect(4);
@@ -11,7 +11,7 @@ function testOverload() {
ok(overloaded.select, "overloaded.select exists");
});
- module("overload definition in string")
+ module("overload string definition")
test("overload support for no argument", function() {
expect(1);
@@ -199,7 +199,7 @@ function testOverload() {
equals(overloaded(null, null), "overload-for-one-argument-and-more", 'overloaded(null, null)');
});
- module("overload definition in array")
+ module("overload array definition")
test("overload support for no argument", function() {
expect(1);

0 comments on commit 3d50e7f

Please sign in to comment.