Skip to content

Commit

Permalink
Fix #3883 lazy load parentLocale test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyers committed Nov 21, 2017
1 parent c377b8e commit 5b756f1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/moment/locale_inheritance.js
Expand Up @@ -183,3 +183,13 @@ test('define child locale before parent', function (assert) {

assert.equal(moment().locale('months-x').month(0).format('MMMM'), 'First', 'loading child before parent locale works');
});

test('lazy load parentLocale', function (assert) {
moment.defineLocale('de', null);

moment.defineLocale('de_test', {
parentLocale: 'de',
monthsShort: ['M1', 'M2', 'M3', 'M4', 'M5', 'M6', 'M7', 'M8', 'M9', 'M10', 'M11', 'M12']
});
assert.equal(moment.locale(), 'de_test', 'failed to lazy load parentLocale');
});

0 comments on commit 5b756f1

Please sign in to comment.