diff --git a/frontend/src/components/RestaurantCard/RestaurantCard.component.test.tsx b/frontend/src/components/RestaurantCard/RestaurantCard.component.test.tsx index 327450e..daee601 100644 --- a/frontend/src/components/RestaurantCard/RestaurantCard.component.test.tsx +++ b/frontend/src/components/RestaurantCard/RestaurantCard.component.test.tsx @@ -2,17 +2,18 @@ import {render, screen} from '@testing-library/react'; import '@testing-library/jest-dom'; import RestaurantCard from "./RestaurantCard.tsx"; import {RestaurantType} from "../../model/Restaurant.ts"; +import {BrowserRouter} from "react-router-dom"; test('RestaurantCard component displays title of the restaurant', () => { const restaurant: RestaurantType = {id: "1", title: "Don Carlos", city: "Berlin"} - render(); + render(); const restaurantTitle = screen.getByText(/Don Carlos/i); expect(restaurantTitle).toBeInTheDocument(); }); test("RestaurantCard component displays the title of the restaurant as h2", () => { const restaurant: RestaurantType = {id: "1", title: "Don Carlos", city: "Berlin"} - render(); + render(); const restaurantTitle = screen.getByRole("heading", { level: 2, name: /don carlos/i @@ -22,7 +23,7 @@ test("RestaurantCard component displays the title of the restaurant as h2", () = test("RestaurantCard component displays the city", () => { const restaurant: RestaurantType = {id: "1", title: "Don Carlos", city: "Berlin"} - render(); + render(); const restaurantCity = screen.getByText(/Berlin/i); expect(restaurantCity).toBeInTheDocument(); }) \ No newline at end of file