16 lines
467 B
JavaScript
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");
|
|
});
|
|
}); |