incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [31/35] git commit: fix compass tests
Date Thu, 23 Feb 2012 17:53:19 GMT
fix compass tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/72d7d965
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/72d7d965
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/72d7d965

Branch: refs/heads/ios
Commit: 72d7d96556e26ab2ca25de94cdb3345ff93aa125
Parents: 0fc2b1a
Author: Gord Tanner <gtanner@gmail.com>
Authored: Thu Feb 16 09:57:02 2012 -0500
Committer: Gord Tanner <gtanner@gmail.com>
Committed: Thu Feb 16 09:57:02 2012 -0500

----------------------------------------------------------------------
 lib/plugin/compass.js |    2 +-
 test/test.compass.js  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/72d7d965/lib/plugin/compass.js
----------------------------------------------------------------------
diff --git a/lib/plugin/compass.js b/lib/plugin/compass.js
index 6abb24f..bd93582 100644
--- a/lib/plugin/compass.js
+++ b/lib/plugin/compass.js
@@ -69,7 +69,7 @@ var exec = require('cordova/exec'),
                 }
                 successCallback(result);   
             };
-            timers[id] = setInterval(function() {
+            timers[id] = window.setInterval(function() {
                  exec(win, errorCallback, "Compass", "getHeading", []);
             }, frequency);
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/72d7d965/test/test.compass.js
----------------------------------------------------------------------
diff --git a/test/test.compass.js b/test/test.compass.js
index 4c927a4..497ec01 100644
--- a/test/test.compass.js
+++ b/test/test.compass.js
@@ -31,7 +31,7 @@ describe("compass", function () {
                 f = function () {};
 
             compass.getCurrentHeading(s, f);
-            expect(exec).toHaveBeenCalledWith(s, f, "Compass", "getHeading", []);
+            expect(exec).toHaveBeenCalledWith(jasmine.any(Function), f, "Compass", "getHeading",
[]);
         });
     });
 
@@ -94,7 +94,7 @@ describe("compass", function () {
 
             //exec the interval callback!
             window.setInterval.mostRecentCall.args[0]();
-            expect(exec).toHaveBeenCalledWith(success, fail, "Compass", "getHeading", []);
+            expect(exec).toHaveBeenCalledWith(jasmine.any(Function), fail, "Compass", "getHeading",
[]);
         });
     });
 


Mime
View raw message