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 <[email protected]> Authored: Thu Nov 10 10:14:42 2016 +0300 Committer: Vladimir Kotikov <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
