16 lines
539 B
JavaScript
16 lines
539 B
JavaScript
import "@testing-library/jest-dom";
|
|
import {render, screen} from '@testing-library/react'
|
|
import MovieCard from '../src/common/components/MovieCard.tsx'
|
|
const movie = {
|
|
Title: "Dune",
|
|
Year: "2000",
|
|
imdbID: "tt0142032",
|
|
Type: "series",
|
|
Poster: "https://m.media-amazon.com/images/M/MV5BMTU4MjMyMTkxN15BMl5BanBnXkFtZTYwODA5OTU5._V1_SX300.jpg"
|
|
}
|
|
|
|
test('MovieCard Renders',()=>{
|
|
render(<MovieCard movie={movie} />)
|
|
const movieTitle = screen.getByRole('heading')
|
|
expect(movieTitle).toHaveTextContent('Dune')
|
|
}) |