You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2015/09/02 07:49:02 UTC
[3/3] cordova-plugin-vibration git commit: Fixed browser platform to
pass tests and combined tests
Fixed browser platform to pass tests and combined tests
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/commit/84a9ea29
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/tree/84a9ea29
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/diff/84a9ea29
Branch: refs/heads/master
Commit: 84a9ea29b7c49a5c2ab43cf8f062bd89a998e3c6
Parents: 6111d62
Author: Suraj Pindoria <su...@yahoo.com>
Authored: Tue Sep 1 14:03:32 2015 -0700
Committer: Suraj Pindoria <su...@yahoo.com>
Committed: Tue Sep 1 14:03:32 2015 -0700
----------------------------------------------------------------------
plugin.xml | 3 ++-
tests/tests.js | 8 ++++----
2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/84a9ea29/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 51df391..73674a2 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -141,7 +141,8 @@
<!-- browser -->
<platform name="browser">
<js-module src="src/browser/Vibration.js" name="Vibration">
- <clobbers target="navigator" />
+ <merges target="navigator.notification" />
+ <merges target="navigator" />
</js-module>
</platform>
http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/84a9ea29/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 3ab43d1..79aff30 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -22,13 +22,13 @@
exports.defineAutoTests = function () {
describe('Vibration (navigator.notification.vibrate)', function () {
- it("navigator.notification should exist", function () {
+ it("navigator.notification should exist with vibrate function", function () {
expect(navigator.notification).toBeDefined();
- });
-
- it("should contain a vibrate function", function () {
expect(typeof navigator.notification.vibrate).toBeDefined();
expect(typeof navigator.notification.vibrate).toBe("function");
+
+ if (cordova.platformId == "browser")
+ expect(navigator.notification.vibrate(0)).toBe(false);
});
});
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org