From: TGJG-XPS\TracyG Date: Mon, 6 Mar 2017 20:19:20 +0000 (+0000) Subject: Checking rfc2822 parsingFlags X-Git-Tag: 2.18.0~12^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d6c97b2960ce932601e6fe7babb420bed480488;p=thirdparty%2Fmoment.git Checking rfc2822 parsingFlags --- diff --git a/src/test/moment/create.js b/src/test/moment/create.js index 43376f1bd..7337da16e 100644 --- a/src/test/moment/create.js +++ b/src/test/moment/create.js @@ -471,6 +471,7 @@ test('parsing RFC 2822', function (assert) { for (testCase in testCases) { var testResult = moment(testCases[testCase], moment.RFC_2822, true); assert.ok(testResult.isValid(), testResult); + assert.ok(testResult.parsingFlags().rfc2822(), testResult + ' - rfc2822 parsingFlag'); } }); @@ -484,6 +485,7 @@ test('non RFC 2822 strings', function (assert) { for (testCase in testCases) { var testResult = moment(testCases[testCase], moment.RFC_2822, true); assert.ok(!testResult.isValid(), testResult); + assert.ok(!testResult.parsingFlags().rfc2822(), testResult + ' - rfc2822 parsingFlag'); } });