You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sg...@apache.org on 2015/02/11 13:50:32 UTC
cordova-plugin-globalization git commit: CB-8394 pended unsupported
tests for windows and wp8
Repository: cordova-plugin-globalization
Updated Branches:
refs/heads/master 87b3ae4d4 -> 73febdf4e
CB-8394 pended unsupported tests for windows and wp8
github close #35
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/commit/73febdf4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/tree/73febdf4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/diff/73febdf4
Branch: refs/heads/master
Commit: 73febdf4e004f160dc53dfc56f7b3b2d0f950abb
Parents: 87b3ae4
Author: alsorokin <al...@akvelon.com>
Authored: Wed Feb 11 15:29:40 2015 +0300
Committer: sgrebnov <v-...@microsoft.com>
Committed: Wed Feb 11 15:50:45 2015 +0300
----------------------------------------------------------------------
tests/tests.js | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/blob/73febdf4/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 3362363..1c257a7 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -20,6 +20,9 @@
*/
exports.defineAutoTests = function () {
+ var isWindowsPhone = cordova.platformId == 'windowsphone',
+ isWindows = (cordova.platformId === "windows") || (cordova.platformId === "windows8");
+
var fail = function (done) {
expect(true).toBe(false);
done();
@@ -443,18 +446,33 @@ exports.defineAutoTests = function () {
expect(typeof navigator.globalization.getNumberPattern == 'function').toBe(true);
});
it("globalization.spec.37 getNumberPattern using default options, success callback should be called with a Properties object", function (done) {
+ // the pattern property is not supported on windows and windows phone
+ // https://github.com/apache/cordova-plugin-globalization/blob/master/doc/index.md#windows-phone-8-quirks-5
+ if (isWindows || isWindowsPhone) {
+ pending();
+ }
navigator.globalization.getNumberPattern(function (a) {
checkNumberPattern(a);
done();
}, fail.bind(null, done));
});
it("globalization.spec.38 getNumberPattern using type=percent, success callback should be called with a Properties object", function (done) {
+ // the pattern property is not supported on windows and windows phone
+ // https://github.com/apache/cordova-plugin-globalization/blob/master/doc/index.md#windows-phone-8-quirks-5
+ if (isWindows || isWindowsPhone) {
+ pending();
+ }
navigator.globalization.getNumberPattern(function (a) {
checkNumberPattern(a);
done();
}, fail.bind(null, done), { type: 'percent' });
});
it("globalization.spec.39 getNumberPattern using type=currency, success callback should be called with a Properties object", function (done) {
+ // the pattern property is not supported on windows and windows phone
+ // https://github.com/apache/cordova-plugin-globalization/blob/master/doc/index.md#windows-phone-8-quirks-5
+ if (isWindows || isWindowsPhone) {
+ pending();
+ }
navigator.globalization.getNumberPattern(function (a) {
checkNumberPattern(a);
done();
@@ -464,10 +482,20 @@ exports.defineAutoTests = function () {
describe("getCurrencyPattern", function () {
it("globalization.spec.1 should exist", function () {
+ // wp8 is unsupported
+ if (isWindowsPhone) {
+ pending();
+ }
expect(typeof navigator.globalization.getCurrencyPattern).toBeDefined();
expect(typeof navigator.globalization.getCurrencyPattern == 'function').toBe(true);
});
it("globalization.spec.41 getCurrencyPattern using EUR for currency, success callback should be called with a Properties object", function (done) {
+ // only `code` and `fraction` properties are supported on windows
+ // https://github.com/apache/cordova-plugin-globalization/blob/master/doc/index.md#windows-quirks-3
+ // wp8 is unsupported
+ if (isWindowsPhone || isWindows) {
+ pending();
+ }
navigator.globalization.getCurrencyPattern("EUR", function (a) {
expect(a).toBeDefined();
expect(typeof a).toBe('object');
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org