UNPKG

@applicaster/zapp-react-native-ui-components

Version:

Applicaster Zapp React Native ui components for the Quick Brick App

58 lines (53 loc) 1.52 kB
import React from "react"; import { render } from "@testing-library/react-native"; import { AudioPlayerTV } from ".."; jest.mock("@applicaster/zapp-react-native-utils/audioPlayerUtils", () => ({ useArtworkImage: jest.fn(() => "artwork_url"), })); const audioPlayerProps = { audio_item: { title: "tittle", summary: "Summary", content: { src: "https://example.com", }, media_group: [ { type: "audio", media_item: [ { type: "audio", src: "https://example.com", key: "base_code", }, ], }, ], extensions: { audio_player_artwork_aspect_ratio: "1:1", audio_player_background_image: "https://example.com", audio_player_background_color: "black", audio_player_channel_icon: "https://example.com", audio_player_title_color: "white", audio_player_summary_color: "white", audio_player_rtl: true, start_time: "10:10", end_time: "11:11", }, }, plugin_configuration: { audio_player_background_color: "black", audio_player_title_color: "white", audio_player_summary_color: "white", audio_player_rtl: true, audio_player_background_image: "https://example.com", audio_player_artwork_aspect_ratio: "1:1", }, styles: {}, }; describe("<AudioPlayerTV />", () => { it("renders correctly", () => { const { toJSON } = render(<AudioPlayerTV {...audioPlayerProps} />); expect(toJSON()).toMatchSnapshot(); }); });