Skip to content

Commit

Permalink
fix(v2): Allow footer logo at attribute to be empty (#3817)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongarciah authored Nov 25, 2020
1 parent d25a54f commit 1fafdb0
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 1fafdb0

Please sign in to comment.