Skip to content

Commit 7802eef

Browse files
author
Jeremy Hamilton
committed
fix unit tests
1 parent d3341cc commit 7802eef

File tree

2 files changed

+9
-23
lines changed

2 files changed

+9
-23
lines changed

src/buttons/__tests__/Button.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,6 @@ describe('Button Component', () => {
5353
jest.resetModules();
5454
});
5555

56-
it('should warn the user when using linearGradient without it installed', () => {
57-
console.error = jest.fn();
58-
shallow(
59-
<Button
60-
theme={theme}
61-
linearGradientProps={{ colors: ['#4c669f', '#3b5998', '#192f6a'] }}
62-
/>
63-
);
64-
expect(console.error).toHaveBeenCalledWith(
65-
"You need to pass a ViewComponent to use linearGradientProps !\nExample: ViewComponent={require('react-native-linear-gradient')}"
66-
);
67-
});
68-
6956
describe('Button Types', () => {
7057
describe('Solid', () => {
7158
it('should display solid button', () => {

src/social/SocialIcon.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,16 @@ const SocialIcon: React.FunctionComponent<SocialIconProps> = (props) => {
161161
])}
162162
>
163163
<View style={styles.wrapper}>
164-
{
165-
(shouldShowExpandedButton || !loading) &&
164+
{(shouldShowExpandedButton || !loading) && (
166165
<Icon
167-
//@ts-ignore
168-
iconStyle={StyleSheet.flatten([iconStyle && iconStyle])}
169-
color={light ? colors[type] : iconColor}
170-
name={type}
171-
size={iconSize}
172-
type={iconType}
166+
//@ts-ignore
167+
iconStyle={StyleSheet.flatten([iconStyle && iconStyle])}
168+
color={light ? colors[type] : iconColor}
169+
name={type}
170+
size={iconSize}
171+
type={iconType}
173172
/>
174-
}
173+
)}
175174
{shouldShowExpandedButton && (
176175
<Text
177176
//@ts-ignore
@@ -194,7 +193,7 @@ const SocialIcon: React.FunctionComponent<SocialIconProps> = (props) => {
194193
styles.activityIndicatorStyle,
195194
activityIndicatorStyle,
196195
])}
197-
color={light ? colors[type] : iconColor}
196+
color={light ? colors[type] : iconColor || 'white'}
198197
size={(small && 'small') || 'large'}
199198
/>
200199
)}

0 commit comments

Comments
 (0)