Skip to content

Commit

Permalink
[bugfix] Fix moment#4698: Added regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ashsearle committed Oct 31, 2018
1 parent e4d5e61 commit 3fa1520
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/moment/format.js
Expand Up @@ -536,3 +536,8 @@ test('Y token', function (assert) {
assert.equal(moment('9999-01-01', 'Y-MM-DD', true).format('Y'), '9999', 'format 9999 with Y');
assert.equal(moment('10000-01-01', 'Y-MM-DD', true).format('Y'), '+10000', 'format 10000 with Y');
});

test('HTML5_FMT.WEEK', function (assert) {
assert.equal(moment('2004-W01', moment.HTML5_FMT.WEEK).format(moment.HTML5_FMT.WEEK), '2004-W01', 'issue #4698 regression');
assert.equal(moment('2019-W01').format(moment.HTML5_FMT.WEEK), '2019-W01', 'issue #4833 regression');
});

0 comments on commit 3fa1520

Please sign in to comment.