You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2016/12/08 00:56:20 UTC
[4/5] cordova-plugin-battery-status git commit: CB-8929 Fix failing
tests on iOS
CB-8929 Fix failing tests on iOS
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/commit/248f96fc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/tree/248f96fc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/diff/248f96fc
Branch: refs/heads/1.2.x
Commit: 248f96fcdd98e02a69e1d82b7a53bfdfed510a08
Parents: 85c6f50
Author: Vladimir Kotikov <ko...@gmail.com>
Authored: Thu Nov 10 10:14:42 2016 +0300
Committer: Vladimir Kotikov <ko...@gmail.com>
Committed: Thu Nov 10 10:14:42 2016 +0300
----------------------------------------------------------------------
tests/tests.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/248f96fc/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 69211ad..428208f 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -23,8 +23,9 @@
/* global Windows, WinJS */
exports.defineAutoTests = function () {
- var hasPowerManagerAPI = Windows && Windows.System &&
- Windows.System.Power && Windows.System.Power.PowerManager;
+ var hasPowerManagerAPI = cordova.platformId === "windows" &&
+ Windows && Windows.System && Windows.System.Power &&
+ Windows.System.Power.PowerManager;
var batteryStatusUnsupported = cordova.platformId === "windows8" ||
// We don't test battery status on Windows when there is no corresponding APIs available
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org