Skip to content

Commit

Permalink
Create VideoCard.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaboleken committed Dec 29, 2024
1 parent 50f4654 commit 507f2d2
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions react/src/__tests__/Components/Cards/VideoCard.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React from 'react';
import { render } from '@testing-library/react';
import theme from "styles/theme";
import { ThemeProvider } from '@mui/material/styles';
import {ThemeList} from "styles/themeList";
import VideoCard from "../../../Components/Cards/VideoCard";

describe('VideoCard Component', () => {

beforeEach(() => {
// Reset the mock implementation before each test
jest.clearAllMocks();
});

it('renders without crashing', () => {
render(
<ThemeProvider theme={theme(ThemeList.Green)}>
<VideoCard
key={1}
trackAssignment={[]}
autoPlay
name={""}
style={{display: "none"}}
streamName={"streamName"}
isPublished={true}
isPlayOnly={false}
isMyMicMuted={false}
isMyCamTurnedOff={false}
allParticipants={{participantId: {name: "name"}}}
setParticipantIdMuted={jest.fn()}
turnOnYourMicNotification={jest.fn()}
turnOffYourMicNotification={jest.fn()}
turnOffYourCamNotification={jest.fn()}
pinVideo={jest.fn()}
isAdmin={true}
publishStreamId={"publishStreamId"}
localVideo={null}
localVideoCreate={jest.fn()}
/>
</ThemeProvider>
);
});

});

0 comments on commit 507f2d2

Please sign in to comment.