Skip to content

Commit

Permalink
Mention capitalization in configuration warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
mint-thompson committed Aug 4, 2023
1 parent ae2d50d commit 2d1a788
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/import/importConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions test/import/importConfiguration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
);
});

Expand Down Expand Up @@ -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.'
);
});

Expand Down Expand Up @@ -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.'
);
});

Expand Down Expand Up @@ -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.'
);
});

Expand Down

0 comments on commit 2d1a788

Please sign in to comment.