From 2d1a788658b45bd52dbb53760b3f0b5851cb6558 Mon Sep 17 00:00:00 2001 From: Mint Thompson Date: Fri, 4 Aug 2023 11:55:10 -0400 Subject: [PATCH] Mention capitalization in configuration warning message --- src/import/importConfiguration.ts | 2 +- test/import/importConfiguration.test.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/import/importConfiguration.ts b/src/import/importConfiguration.ts index 83287c59c..a2fe6c4dd 100644 --- a/src/import/importConfiguration.ts +++ b/src/import/importConfiguration.ts @@ -921,7 +921,7 @@ function detectPotentialMistakes(yaml: YAMLConfiguration) { .join(', '); let recommendation = `Check that ${ singular ? 'this property is' : 'these properties are' - } spelled and indented correctly.`; + } spelled, capitalized, and indented correctly.`; if (instancePath.startsWith('/pages')) { recommendation += ` If ${ singular ? 'this is a page, it' : 'these are pages, they' diff --git a/test/import/importConfiguration.test.ts b/test/import/importConfiguration.test.ts index fb316d8e9..fcd020d95 100644 --- a/test/import/importConfiguration.test.ts +++ b/test/import/importConfiguration.test.ts @@ -469,7 +469,7 @@ describe('importConfiguration', () => { expect(actual).toEqual(expected); expect(loggerSpy.getAllLogs('error')).toHaveLength(0); expect(loggerSpy.getLastMessage('warn')).toMatch( - 'Configuration contains unexpected property: cookie. Check that this property is spelled and indented correctly.' + 'Configuration contains unexpected property: cookie. Check that this property is spelled, capitalized, and indented correctly.' ); }); @@ -503,7 +503,7 @@ describe('importConfiguration', () => { expect(actual).toEqual(expected); expect(loggerSpy.getAllLogs('error')).toHaveLength(0); expect(loggerSpy.getLastMessage('warn')).toMatch( - 'Configuration contains unexpected properties: cookie, index.md. Check that these properties are spelled and indented correctly.' + 'Configuration contains unexpected properties: cookie, index.md. Check that these properties are spelled, capitalized, and indented correctly.' ); }); @@ -2168,7 +2168,7 @@ describe('importConfiguration', () => { } ]); expect(loggerSpy.getLastMessage('warn')).toMatch( - 'Configuration property pages contains unexpected property: menu. Check that this property is spelled and indented correctly. If this is a page, it should end with .md, .xml, or .html.' + 'Configuration property pages contains unexpected property: menu. Check that this property is spelled, capitalized, and indented correctly. If this is a page, it should end with .md, .xml, or .html.' ); }); @@ -2202,7 +2202,7 @@ describe('importConfiguration', () => { { nameUrl: 'license', page: [] } ]); expect(loggerSpy.getLastMessage('warn')).toMatch( - 'Configuration property pages contains unexpected properties: menu, license. Check that these properties are spelled and indented correctly. If these are pages, they should end with .md, .xml, or .html.' + 'Configuration property pages contains unexpected properties: menu, license. Check that these properties are spelled, capitalized, and indented correctly. If these are pages, they should end with .md, .xml, or .html.' ); });