From 5b756f168f0bcbcce872dc14c318f374094fce5d Mon Sep 17 00:00:00 2001 From: Chris Myers Date: Sat, 18 Nov 2017 22:50:38 +0000 Subject: [PATCH] Fix #3883 lazy load parentLocale test --- src/test/moment/locale_inheritance.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/moment/locale_inheritance.js b/src/test/moment/locale_inheritance.js index 177f04370a..133bb58b0d 100644 --- a/src/test/moment/locale_inheritance.js +++ b/src/test/moment/locale_inheritance.js @@ -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'); +});