import "@testing-library/jest-dom";
import { queryOMDb } from "../src/api/omdb.ts";

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");
});

// f=dune

// Warning: React does not recognize the `fetchPriority` prop on a DOM element
// The `punycode` module is deprecated. Please use a userland alternative instead.