Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

merging async test cases

  • Loading branch information...
commit 3d50e7f6b399de97e84b6306a644b79adb620a89 1 parent 4dbc413
@CatChen CatChen authored
Showing with 22 additions and 2 deletions.
  1. +20 −0 test/javascripts/async.js
  2. +2 −2 test/javascripts/overload.js
View
20 test/javascripts/async.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);
View
4 test/javascripts/overload.js
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.