Skip to content

Commit

Permalink
Merge branch 'patch/v1.9.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
troberts-28 committed Jul 1, 2024
2 parents a398065 + f8c88c1 commit 1b58406
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/troberts-28"
},
"license": "MIT",
"version": "1.9.0",
"version": "1.9.1",
"main": "dist/commonjs/index.js",
"types": "dist/typescript/src/index.d.ts",
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion src/components/TimerPicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const TimerPicker = forwardRef<TimerPickerRef, TimerPickerProps>(
allowFontScaling = false,
amLabel = "am",
disableInfiniteScroll = false,
FlatList,
hideHours = false,
hideMinutes = false,
hideSeconds = false,
Expand Down
12 changes: 12 additions & 0 deletions src/tests/TimerPicker.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";

import { render } from "@testing-library/react-native";
import { FlatList } from "react-native";

import TimerPicker from "../components/TimerPicker";

Expand All @@ -26,4 +27,15 @@ describe("TimerPicker", () => {
expect(minutePicker).toBeNull();
expect(secondPicker).toBeNull();
});

it("uses the custom FlatList component when provided", () => {
const CustomFlatList = (props) => (
<FlatList {...props} testID="custom-flat-list" />
);
const { queryAllByTestId } = render(
<TimerPicker FlatList={CustomFlatList} />
);
const customFlatList = queryAllByTestId("custom-flat-list");
expect(customFlatList).toHaveLength(3);
});
});

0 comments on commit 1b58406

Please sign in to comment.