fix(v2): Allow footer logo at attribute to be empty (#3817)

This commit is contained in:
Aarón García Hervás 2020-11-25 13:12:45 +01:00 committed by GitHub
parent d25a54f61d
commit 1fafdb0d33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View file

@ -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: {