Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Caele committed Mar 27, 2023
1 parent 86a35cb commit 5db029b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions apis/nucleus/src/utils/__tests__/background-props.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ describe('Background property resolver', () => {
main: {
color: { color: 'red' },
fontFamily: 'familiiii',
fontStyle: ['underline'],
fontStyle: ['underline', 'italic'],
},
},
};
const style = resolveTextStyle(prop, 'main', t, 'peoplechart');
expect(style).toEqual({
color: 'red',
fontFamily: 'familiiii',
fontWeight: 'bold',
fontStyle: 'normal',
fontWeight: 'normal',
fontStyle: 'italic',
textDecoration: 'underline',
});
});
Expand Down
6 changes: 3 additions & 3 deletions apis/nucleus/src/utils/background-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ export function resolveBgColor(bgComp, theme, objectType) {
}
return undefined;
}
function unfurlFontStyle(textProps, target) {
if (textProps.fontStyle && Array.isArray(textProps.fontStyle)) {
return textProps.fontStyle;
function unfurlFontStyle(fontStyle, target) {
if (fontStyle && Array.isArray(fontStyle)) {
return fontStyle;
}
return target === 'main' ? ['bold'] : [];
}
Expand Down

0 comments on commit 5db029b

Please sign in to comment.