16 lines
532 B
React
16 lines
532 B
React
|
import "@testing-library/jest-dom";
|
||
|
import {render, screen} from '@testing-library/react'
|
||
|
import MovieCard from '../src/app/Search/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')
|
||
|
})
|