Skip to content

Commit

Permalink
update jest
Browse files Browse the repository at this point in the history
  • Loading branch information
sieu-db committed Dec 4, 2024
1 parent 3a478ba commit d0009af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions packages/core/jest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ jest.mock("expo-asset", () => {
jest.mock("@react-native-async-storage/async-storage", () =>
require("@react-native-async-storage/async-storage/jest/async-storage-mock")
);

jest.mock("expo-font", () => ({
loadAsync: jest.fn(),
isLoaded: jest.fn(() => true),
isLoading: jest.fn(() => false),
}));
7 changes: 4 additions & 3 deletions packages/core/src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
TextStyle,
ActivityIndicator,
ViewStyle,
StyleProp,
} from "react-native";
import { withTheme } from "@draftbit/theme";
import type { ReadTheme } from "@draftbit/theme";
Expand Down Expand Up @@ -112,7 +113,7 @@ function Base({
{
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
},
buttonStyles as ViewStyle,
buttonStyles as StyleProp<ViewStyle>,
];
}}
{...props}
Expand Down Expand Up @@ -151,7 +152,7 @@ const Solid = ({ style, theme, ...props }: Props): JSX.Element => {
borderRadius: 8,
backgroundColor: theme.colors.branding.primary,
},
style as ViewStyle,
style as StyleProp<ViewStyle>,
]}
{...props}
/>
Expand All @@ -178,7 +179,7 @@ const Outline = ({ style, theme, ...props }: Props): JSX.Element => {
//@ts-ignore
color: theme.colors.branding.primary,
},
style as ViewStyle,
style as StyleProp<ViewStyle>,
]}
{...props}
/>
Expand Down

0 comments on commit d0009af

Please sign in to comment.