]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[tests] Fix various text typos (#4976)
authorPhil Davis <phil@jankaritech.com>
Sat, 2 Feb 2019 07:17:19 +0000 (13:02 +0545)
committerKunal Marwaha <marwahaha@berkeley.edu>
Sat, 2 Feb 2019 07:17:19 +0000 (23:17 -0800)
src/lib/create/from-string.js
src/test/moment/create.js
src/test/moment/duration.js
src/test/moment/is_after.js
src/test/moment/is_before.js
src/test/moment/locale_inheritance.js
src/test/moment/locale_update.js
src/test/moment/weekday.js
src/test/moment/zones.js

index c5ad56bab8b7cf73a8752c78673bc045ef3a2028..9ea014ab2635da60d851f757a7ba4d4f43b564d8 100644 (file)
@@ -133,7 +133,7 @@ function preprocessRFC2822(s) {
 
 function checkWeekday(weekdayStr, parsedInput, config) {
     if (weekdayStr) {
-        // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
+        // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
         var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
             weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
         if (weekdayProvided !== weekdayActual) {
index 159dcf90b1f8dc20561d33ae0bc418215d91be7a..da5e3c60493e5a074d3fd7fc97bf39b1235e26ba 100644 (file)
@@ -756,21 +756,21 @@ test('parsing weekdays verifies the day', function (assert) {
     assert.ok(moment('Thu 08-10-2017', 'ddd MM-DD-YYYY').isValid(), 'because day of week is correct for the date');
 });
 
-test('parsing weekday on utc dates verifies day acccording to utc time', function (assert) {
+test('parsing weekday on utc dates verifies day according to utc time', function (assert) {
     assert.ok(moment.utc('Mon 03:59', 'ddd HH:mm').isValid(), 'Monday 03:59');
 });
 
-test('parsing weekday on local dates verifies day acccording to local time', function (assert) {
+test('parsing weekday on local dates verifies day according to local time', function (assert) {
     // this doesn't do much useful if you're not in the US or at least close to it
     assert.ok(moment('Mon 03:59', 'ddd HH:mm').isValid(), 'Monday 03:59');
 });
 
-test('parsing weekday on utc dates with specified offsets verifies day acccording to that offset', function (assert) {
+test('parsing weekday on utc dates with specified offsets verifies day according to that offset', function (assert) {
     assert.ok(moment.utc('Mon 03:59 +12:00', 'ddd HH:mm Z', true).isValid(), 'Monday 03:59');
 });
 
-test('parsing weekday on local dates with specified offsets verifies day acccording to that offset', function (assert) {
-    // if you're in the US, these times will all be sometime Sunday, but they shoud parse as Monday
+test('parsing weekday on local dates with specified offsets verifies day according to that offset', function (assert) {
+    // if you're in the US, these times will all be sometime Sunday, but they should parse as Monday
     assert.ok(moment('Mon 03:59 +12:00', 'ddd HH:mm Z', true).isValid(), 'Monday 03:59');
 });
 
index a067eca5e462fdec503f279280eebaa520912d54..3a6e9e161c37dfa9f10a0148df6325095b6d2f53 100644 (file)
@@ -182,7 +182,7 @@ test('instantiation from 24-hour time >24 hours', function (assert) {
     assert.equal(moment.duration('26:45').milliseconds(), 0, '0 milliseconds');
 });
 
-test('instatiation from serialized C# TimeSpan zero', function (assert) {
+test('instantiation from serialized C# TimeSpan zero', function (assert) {
     assert.equal(moment.duration('00:00:00').years(), 0, '0 years');
     assert.equal(moment.duration('00:00:00').days(), 0, '0 days');
     assert.equal(moment.duration('00:00:00').hours(), 0, '0 hours');
@@ -191,7 +191,7 @@ test('instatiation from serialized C# TimeSpan zero', function (assert) {
     assert.equal(moment.duration('00:00:00').milliseconds(), 0, '0 milliseconds');
 });
 
-test('instatiation from serialized C# TimeSpan with days', function (assert) {
+test('instantiation from serialized C# TimeSpan with days', function (assert) {
     assert.equal(moment.duration('1.02:03:04.9999999').years(), 0, '0 years');
     assert.equal(moment.duration('1.02:03:04.9999999').days(), 1, '1 day');
     assert.equal(moment.duration('1.02:03:04.9999999').hours(), 2, '2 hours');
@@ -207,7 +207,7 @@ test('instatiation from serialized C# TimeSpan with days', function (assert) {
     assert.equal(moment.duration('1 02:03:04.9999999').milliseconds(), 0, '0 milliseconds');
 });
 
-test('instatiation from serialized C# TimeSpan without days', function (assert) {
+test('instantiation from serialized C# TimeSpan without days', function (assert) {
     assert.equal(moment.duration('01:02:03.9999999').years(), 0, '0 years');
     assert.equal(moment.duration('01:02:03.9999999').days(), 0, '0 days');
     assert.equal(moment.duration('01:02:03.9999999').hours(), 1, '1 hour');
@@ -225,7 +225,7 @@ test('instatiation from serialized C# TimeSpan without days', function (assert)
     assert.equal(moment.duration('500:59:59.8888888').hours(), 20, '500 hours overflows to 20 hours');
 });
 
-test('instatiation from serialized C# TimeSpan without days or milliseconds', function (assert) {
+test('instantiation from serialized C# TimeSpan without days or milliseconds', function (assert) {
     assert.equal(moment.duration('01:02:03').years(), 0, '0 years');
     assert.equal(moment.duration('01:02:03').days(), 0, '0 days');
     assert.equal(moment.duration('01:02:03').hours(), 1, '1 hour');
@@ -234,7 +234,7 @@ test('instatiation from serialized C# TimeSpan without days or milliseconds', fu
     assert.equal(moment.duration('01:02:03').milliseconds(), 0, '0 milliseconds');
 });
 
-test('instatiation from serialized C# TimeSpan without milliseconds', function (assert) {
+test('instantiation from serialized C# TimeSpan without milliseconds', function (assert) {
     assert.equal(moment.duration('1.02:03:04').years(), 0, '0 years');
     assert.equal(moment.duration('1.02:03:04').days(), 1, '1 day');
     assert.equal(moment.duration('1.02:03:04').hours(), 2, '2 hours');
@@ -273,7 +273,7 @@ test('instantiation from serialized C# TimeSpan with high millisecond precision'
     assert.equal(moment.duration('+00:00:15.7205000').milliseconds(), 721, '721 milliseconds');
 });
 
-test('instatiation from serialized C# TimeSpan maxValue', function (assert) {
+test('instantiation from serialized C# TimeSpan maxValue', function (assert) {
     var d = moment.duration('10675199.02:48:05.4775807');
 
     assert.equal(d.years(), 29227, '29227 years');
@@ -286,7 +286,7 @@ test('instatiation from serialized C# TimeSpan maxValue', function (assert) {
     assert.equal(d.milliseconds(), 478, '478 milliseconds');
 });
 
-test('instatiation from serialized C# TimeSpan minValue', function (assert) {
+test('instantiation from serialized C# TimeSpan minValue', function (assert) {
     var d = moment.duration('-10675199.02:48:05.4775808');
 
     assert.equal(d.years(), -29227, '29653 years');
@@ -299,7 +299,7 @@ test('instatiation from serialized C# TimeSpan minValue', function (assert) {
     assert.equal(d.milliseconds(), -478, '478 milliseconds');
 });
 
-test('instatiation from serialized C# TimeSpan maxValue with + sign', function (assert) {
+test('instantiation from serialized C# TimeSpan maxValue with + sign', function (assert) {
     var d = moment.duration('+10675199.02:48:05.4775808');
 
     assert.equal(d.years(), 29227, '29653 years');
index 1050acb33b80baa7dc1ba33ee5ad59da23388e20..53e4857aa5afca7b46cf906be309304c4a5fae11 100644 (file)
@@ -106,7 +106,7 @@ test('is after minute', function (assert) {
     assert.equal(m.isAfter(moment(new Date(2011, 3, 3, 3, 4, 9, 10)), 'minute'), false, 'day is later');
     assert.equal(m.isAfter(moment(new Date(2011, 3, 1, 3, 4, 9, 10)), 'minute'), true, 'day is earlier');
     assert.equal(m.isAfter(moment(new Date(2011, 3, 2, 4, 4, 9, 10)), 'minute'), false, 'hour is later');
-    assert.equal(m.isAfter(moment(new Date(2011, 3, 2, 2, 4, 9, 10)), 'minute'), true, 'hour is earler');
+    assert.equal(m.isAfter(moment(new Date(2011, 3, 2, 2, 4, 9, 10)), 'minute'), true, 'hour is earlier');
     assert.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 5, 9, 10)), 'minute'), false, 'minute is later');
     assert.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 3, 9, 10)), 'minute'), true, 'minute is earlier');
     assert.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 0, 0)), 'minute'), false, 'exact start of minute');
index 90d415f462cf819b31cf9dad7e56e99f0a041b42..d193ad2a446646d7254cc804bb1b541eaaac385b 100644 (file)
@@ -106,7 +106,7 @@ test('is before minute', function (assert) {
     assert.equal(m.isBefore(moment(new Date(2011, 3, 3, 3, 4, 9, 10)), 'minute'), true, 'day is later');
     assert.equal(m.isBefore(moment(new Date(2011, 3, 1, 3, 4, 9, 10)), 'minute'), false, 'day is earlier');
     assert.equal(m.isBefore(moment(new Date(2011, 3, 2, 4, 4, 9, 10)), 'minute'), true, 'hour is later');
-    assert.equal(m.isBefore(moment(new Date(2011, 3, 2, 2, 4, 9, 10)), 'minute'), false, 'hour is earler');
+    assert.equal(m.isBefore(moment(new Date(2011, 3, 2, 2, 4, 9, 10)), 'minute'), false, 'hour is earlier');
     assert.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 5, 9, 10)), 'minute'), true, 'minute is later');
     assert.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 3, 9, 10)), 'minute'), false, 'minute is earlier');
     assert.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 0, 0)), 'minute'), false, 'exact start of minute');
index a1e4a4613a2b9187759ad05f4bc24209b04fc532..5a2ee0f21b17a71498b39d943af0c69d75c87c80 100644 (file)
@@ -159,7 +159,7 @@ test('months', function (assert) {
     });
     moment.defineLocale('child-months', {
         parentLocale: 'base-months',
-        months : 'First_Second_Third_Fourth_Fifth_Sixth_Seventh_Eighth_Ninth_Tenth_Eleventh_Twelveth '.split('_')
+        months : 'First_Second_Third_Fourth_Fifth_Sixth_Seventh_Eighth_Ninth_Tenth_Eleventh_Twelfth '.split('_')
     });
     assert.ok(moment.utc('2015-01-01', 'YYYY-MM-DD').format('MMMM'), 'First', 'months uses child');
 });
@@ -170,7 +170,7 @@ test('define child locale before parent', function (assert) {
 
     moment.defineLocale('months-x', {
         parentLocale: 'base-months-x',
-        months : 'First_Second_Third_Fourth_Fifth_Sixth_Seventh_Eighth_Ninth_Tenth_Eleventh_Twelveth '.split('_')
+        months : 'First_Second_Third_Fourth_Fifth_Sixth_Seventh_Eighth_Ninth_Tenth_Eleventh_Twelfth '.split('_')
     });
     assert.equal(moment.locale(), 'en', 'failed to set a locale requiring missing parent');
 
index 35f727bba523ba19a81e62da4fb3cd17be45ee00..b1c57f7423faa0a14f28e5b2610a277e22cd38cb 100644 (file)
@@ -160,7 +160,7 @@ test('months', function (assert) {
     });
     moment.updateLocale('months', {
         parentLocale: 'base-months',
-        months : 'First_Second_Third_Fourth_Fifth_Sixth_Seventh_Eighth_Ninth_Tenth_Eleventh_Twelveth '.split('_')
+        months : 'First_Second_Third_Fourth_Fifth_Sixth_Seventh_Eighth_Ninth_Tenth_Eleventh_Twelfth '.split('_')
     });
     assert.ok(moment.utc('2015-01-01', 'YYYY-MM-DD').format('MMMM'), 'First', 'months uses child');
 });
index db62405998ebd1ab0dfa6be746d5c17131d5c6e4..a1a8d85b34dd23a700842b410b2235b7eeeed3a9 100644 (file)
@@ -100,7 +100,7 @@ test('weekday first day of week Tuesday (dow 2)', function (assert) {
     assert.equal(moment([2029, 8, 19]).weekday(), 1, 'Sep 19 2029 is Wednesday -- 1st day');
     assert.equal(moment([2013, 3, 25]).weekday(), 2, 'Apr 25 2013 is Thursday  -- 2nd day');
     assert.equal(moment([2015, 2,  6]).weekday(), 3, 'Mar  6 2015 is Friday    -- 3nd day');
-    assert.equal(moment([1970, 0,  3]).weekday(), 4, 'Jan  3 1970 is Staturday -- 4th day');
+    assert.equal(moment([1970, 0,  3]).weekday(), 4, 'Jan  3 1970 is Saturday  -- 4th day');
     assert.equal(moment([2001, 4, 13]).weekday(), 5, 'May 13 2001 is Sunday    -- 5th day');
     assert.equal(moment([2000, 0,  3]).weekday(), 6, 'Jan  3 2000 is Monday    -- 6th day');
 });
@@ -131,7 +131,7 @@ test('weekday first day of week Thursday (dow 4)', function (assert) {
 test('weekday first day of week Friday (dow 5)', function (assert) {
     moment.locale('dow: 5,doy: 6', {week: {dow: 5, doy: 6}});
     assert.equal(moment([1985, 1,  8]).weekday(), 0, 'Feb  8 1985 is Friday    -- 0th day');
-    assert.equal(moment([2029, 8, 22]).weekday(), 1, 'Sep 22 2029 is Staturday -- 1st day');
+    assert.equal(moment([2029, 8, 22]).weekday(), 1, 'Sep 22 2029 is Saturday  -- 1st day');
     assert.equal(moment([2013, 3, 28]).weekday(), 2, 'Apr 28 2013 is Sunday    -- 2nd day');
     assert.equal(moment([2015, 2,  9]).weekday(), 3, 'Mar  9 2015 is Monday    -- 3nd day');
     assert.equal(moment([1970, 0,  6]).weekday(), 4, 'Jan  6 1970 is Tuesday   -- 4th day');
@@ -141,7 +141,7 @@ test('weekday first day of week Friday (dow 5)', function (assert) {
 
 test('weekday first day of week Saturday (dow 6)', function (assert) {
     moment.locale('dow: 6,doy: 6', {week: {dow: 6, doy: 6}});
-    assert.equal(moment([1985, 1,  9]).weekday(), 0, 'Feb  9 1985 is Staturday -- 0th day');
+    assert.equal(moment([1985, 1,  9]).weekday(), 0, 'Feb  9 1985 is Saturday  -- 0th day');
     assert.equal(moment([2029, 8, 23]).weekday(), 1, 'Sep 23 2029 is Sunday    -- 1st day');
     assert.equal(moment([2013, 3, 29]).weekday(), 2, 'Apr 29 2013 is Monday    -- 2nd day');
     assert.equal(moment([2015, 2, 10]).weekday(), 3, 'Mar 10 2015 is Tuesday   -- 3nd day');
index a7e4f6ce9444a6b7b722164fbb1ef9251e57e2b3..f2647024b76335d059a4bf650f0fcb84878c0a0e 100644 (file)
@@ -500,7 +500,7 @@ test('parse zone with a minutes unit abs less than 16 should retain minutes', fu
     assert.equal(o.hour(), 0);
 });
 
-test('parse zone with weekday on verifies day acccording to the offset', function (assert) {
+test('parse zone with weekday on verifies day according to the offset', function (assert) {
     test.expectedDeprecations();
     assert.ok(moment.parseZone('Mon 03:59 +12:00', 'ddd HH:mm Z', true).isValid(), 'Monday 03:59');
 });