]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#347] Adds timeout + warning
authorrwldrn <waldron.rick@gmail.com>
Tue, 22 Feb 2011 15:18:26 +0000 (10:18 -0500)
committerrwldrn <waldron.rick@gmail.com>
Tue, 22 Feb 2011 15:18:26 +0000 (10:18 -0500)
test/popcorn.unit.js

index eb913a6be38da60d8ce917392d3890f5a9b9e64f..e355c7849ea0be5e5d363ed1465c2d1fad1ff442 100644 (file)
@@ -1,4 +1,16 @@
 
+if ( /file/.test( location.protocol ) ) {
+
+  test("HTTP", function () {
+    
+    ok( false, "Please run test suite via an HTTP connection" );
+    
+  });
+  
+  throw "Please run test suite via an HTTP connection";
+}
+
+
 module("Popcorn");
 test("API", function () {
   
@@ -1220,7 +1232,7 @@ test("JSONP Response", function () {
   
   expect(expects);
   
-  stop();
+  stop(10000);
 
 
   var testObj = { "data": {"lang": "en", "length": 25} };