incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From becka...@apache.org
Subject [1/2] git commit: adding expectation that options object passed into exec for compass is undefined if we do not pass anything into JS api
Date Wed, 04 Apr 2012 18:07:31 GMT
Updated Branches:
  refs/heads/master 9c962f3b0 -> 0ff216501


adding expectation that options object passed into exec for compass is undefined if we do
not pass anything into JS api


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/0ff21650
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/0ff21650
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/0ff21650

Branch: refs/heads/master
Commit: 0ff2165010b367470e53fe849c503dc1ad0eab9b
Parents: aeaee71
Author: Fil Maj <maj.fil@gmail.com>
Authored: Tue Apr 3 13:41:18 2012 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Tue Apr 3 13:41:18 2012 -0700

----------------------------------------------------------------------
 test/test.compass.js |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/0ff21650/test/test.compass.js
----------------------------------------------------------------------
diff --git a/test/test.compass.js b/test/test.compass.js
index f7d4a75..5d0b8cc 100644
--- a/test/test.compass.js
+++ b/test/test.compass.js
@@ -3,7 +3,9 @@ describe("compass", function () {
         utils = require('cordova/utils'),
         exec = require('cordova/exec');
 
-    exec.reset();
+    beforeEach(function() {
+        exec.reset();
+    });
 
     describe("when getting the current heading", function () {
         it("logs an error and doesn't call exec when no success callback given", function
() {
@@ -33,7 +35,7 @@ describe("compass", function () {
                 f = function () {};
 
             compass.getCurrentHeading(s, f);
-            expect(exec).toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function),
"Compass", "getHeading", []);
+            expect(exec).toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function),
"Compass", "getHeading", [undefined]);
         });
     });
 
@@ -96,7 +98,7 @@ describe("compass", function () {
 
             //exec the interval callback!
             window.setInterval.mostRecentCall.args[0]();
-            expect(exec).toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function),
"Compass", "getHeading", []);
+            expect(exec).toHaveBeenCalledWith(jasmine.any(Function), jasmine.any(Function),
"Compass", "getHeading", [undefined]);
         });
     });
 


Mime
View raw message