]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Re-enable ka tests
authorKunal Marwaha <marwahaha@berkeley.edu>
Wed, 13 May 2020 04:29:49 +0000 (21:29 -0700)
committerKunal Marwaha <marwahaha@berkeley.edu>
Sun, 17 May 2020 11:26:12 +0000 (04:26 -0700)
src/test/helpers/common-locale.js
src/test/locale/ka.js

index 0c117a8b81476778e480e23194857c838d14f1ac..aab29620d8ec015e360fd625440883bec9c3c2bb 100644 (file)
@@ -110,14 +110,8 @@ export function defineCommonLocaleTests(locale, options) {
             var r;
             r = moment(m.format(format), format);
             assert.equal(r.month(), m.month(), 'month ' + i + ' fmt ' + format);
-            if (locale !== 'ka') {
-                r = moment(m.format(format).toLocaleUpperCase(), format);
-                assert.equal(
-                    r.month(),
-                    m.month(),
-                    'month ' + i + ' fmt ' + format + ' upper'
-                );
-            }
+            r = moment(m.format(format).toLocaleUpperCase(), format);
+            assert.equal(r.month(), m.month(), 'month ' + i + ' fmt ' + format + ' upper');
             r = moment(m.format(format).toLocaleLowerCase(), format);
             assert.equal(
                 r.month(),
@@ -126,19 +120,9 @@ export function defineCommonLocaleTests(locale, options) {
             );
 
             r = moment(m.format(format), format, true);
-            assert.equal(
-                r.month(),
-                m.month(),
-                'month ' + i + ' fmt ' + format + ' strict'
-            );
-            if (locale !== 'ka') {
-                r = moment(m.format(format).toLocaleUpperCase(), format, true);
-                assert.equal(
-                    r.month(),
-                    m.month(),
-                    'month ' + i + ' fmt ' + format + ' upper strict'
-                );
-            }
+            assert.equal(r.month(), m.month(), 'month ' + i + ' fmt ' + format + ' strict');
+            r = moment(m.format(format).toLocaleUpperCase(), format, true);
+            assert.equal(r.month(), m.month(), 'month ' + i + ' fmt ' + format + ' upper strict');
             r = moment(m.format(format).toLocaleLowerCase(), format, true);
             assert.equal(
                 r.month(),
@@ -185,22 +169,14 @@ export function defineCommonLocaleTests(locale, options) {
                     m.toISOString();
             r = moment(m.format(format), format);
             assert.equal(r.weekday(), m.weekday(), baseMsg);
-            if (locale !== 'ka') {
-                r = moment(m.format(format).toLocaleUpperCase(), format);
-                assert.equal(r.weekday(), m.weekday(), baseMsg + ' upper');
-            }
+            r = moment(m.format(format).toLocaleUpperCase(), format);
+            assert.equal(r.weekday(), m.weekday(), baseMsg + ' upper');
             r = moment(m.format(format).toLocaleLowerCase(), format);
             assert.equal(r.weekday(), m.weekday(), baseMsg + ' lower');
             r = moment(m.format(format), format, true);
             assert.equal(r.weekday(), m.weekday(), baseMsg + ' strict');
-            if (locale !== 'ka') {
-                r = moment(m.format(format).toLocaleUpperCase(), format, true);
-                assert.equal(
-                    r.weekday(),
-                    m.weekday(),
-                    baseMsg + ' upper strict'
-                );
-            }
+            r = moment(m.format(format).toLocaleUpperCase(), format, true);
+            assert.equal(r.weekday(), m.weekday(), baseMsg + ' upper strict');
             r = moment(m.format(format).toLocaleLowerCase(), format, true);
             assert.equal(r.weekday(), m.weekday(), baseMsg + ' lower strict');
         }
index 0aeb3244ab2985754fd3fca2d298172032bfa58d..e6fc9a93f889aca5e365d042636a03f8b8b7df88 100644 (file)
@@ -25,9 +25,8 @@ test('parse', function (assert) {
         equalTest(tests[i][1], 'MMMM', i);
         equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
         equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
-        // the last two are broken until https://github.com/nodejs/node/issues/22518 is fixed
-        // equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
-        // equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
+        equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
+        equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
     }
 });