Skip to content

Commit

Permalink
Allow alt for footer logo to be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarón García Hervás committed Nov 25, 2020
1 parent d25a54f commit 689d200
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,26 @@ describe('themeConfig', () => {
});
});

test('should allow empty alt tags for the logo image in the footer', () => {
const partialConfig = {
footer: {
logo: {
alt: '',
src: '/arbitrary-logo.png',
},
},
};
const normalizedConfig = testValidateThemeConfig(partialConfig);

expect(normalizedConfig).toEqual({
...normalizedConfig,
footer: {
...normalizedConfig.footer,
...partialConfig.footer,
},
});
});

test('should accept valid prism config', () => {
const prismConfig = {
prism: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ const ThemeConfigSchema = Joi.object({
footer: Joi.object({
style: Joi.string().equal('dark', 'light').default('light'),
logo: Joi.object({
alt: Joi.string(),
alt: Joi.string().allow(''),
src: Joi.string(),
href: Joi.string(),
}),
Expand Down

0 comments on commit 689d200

Please sign in to comment.