<repo_name>AceroJuan/React-App-Gif-Finder<file_sep>/src/Components/GifExpertApp/GifExpertApp.js
import React, { useState } from "react";
import AddCategory from "../AddCategory/AddCategory";
import GifGrid from "../GifGrid/GifGrid";
import "animate.css";

const GifExpertApp = ({ defaultCategories = [] }) => {
  const [categories, setCategories] = useState(defaultCategories);

  return (
    <>
      <h1 className="animate__animated animate__fadeIn">Hola</h1>
      <AddCategory setCategories={setCategories} />
      <hr />
      <ul>
        {categories.map((category) => (
          <GifGrid key={category} category={category} />
        ))}
      </ul>
    </>
  );
};

export default GifExpertApp;
<file_sep>/src/tests/helpers/getGifs.test.js
import getGifs from "../../utils/helpers/getGifs";
import "@testing-library/jest-dom";

describe("pruebas en getGifs.js", () => {
  test("debe traer 15 elementos", async () => {
    const gifs = await getGifs("goku");
    expect(gifs.length).toBe(15);
  });

  test("debe verificar un string vacio", async () => {
    const gifs = await getGifs("");
    expect(gifs.length).toBe(0);
  });
});
