Movie_Search/movie-search/__tests__/omdb.test.jsx
2024-06-02 01:21:21 -04:00

16 lines
467 B
JavaScript

import "@testing-library/jest-dom";
import { queryOMDb } from "../src/api/omdb.ts";
describe("OMDb API Integration", () => {
test("queryOMDb returns movie data successfully", async () => {
const data = await queryOMDb("s=back to");
expect(data).toHaveProperty("Response", "True");
});
test("queryOMDb returns movie with error", async () => {
const data = await queryOMDb("f=dune");
expect(data).toHaveProperty("Response", "False");
});
});