Skip to content

Commit d0009af

Browse files
committed
update jest
1 parent 3a478ba commit d0009af

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

packages/core/jest-setup.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ jest.mock("expo-asset", () => {
2525
jest.mock("@react-native-async-storage/async-storage", () =>
2626
require("@react-native-async-storage/async-storage/jest/async-storage-mock")
2727
);
28+
29+
jest.mock("expo-font", () => ({
30+
loadAsync: jest.fn(),
31+
isLoaded: jest.fn(() => true),
32+
isLoading: jest.fn(() => false),
33+
}));

packages/core/src/components/Button.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
TextStyle,
99
ActivityIndicator,
1010
ViewStyle,
11+
StyleProp,
1112
} from "react-native";
1213
import { withTheme } from "@draftbit/theme";
1314
import type { ReadTheme } from "@draftbit/theme";
@@ -112,7 +113,7 @@ function Base({
112113
{
113114
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
114115
},
115-
buttonStyles as ViewStyle,
116+
buttonStyles as StyleProp<ViewStyle>,
116117
];
117118
}}
118119
{...props}
@@ -151,7 +152,7 @@ const Solid = ({ style, theme, ...props }: Props): JSX.Element => {
151152
borderRadius: 8,
152153
backgroundColor: theme.colors.branding.primary,
153154
},
154-
style as ViewStyle,
155+
style as StyleProp<ViewStyle>,
155156
]}
156157
{...props}
157158
/>
@@ -178,7 +179,7 @@ const Outline = ({ style, theme, ...props }: Props): JSX.Element => {
178179
//@ts-ignore
179180
color: theme.colors.branding.primary,
180181
},
181-
style as ViewStyle,
182+
style as StyleProp<ViewStyle>,
182183
]}
183184
{...props}
184185
/>

0 commit comments

Comments
 (0)