{"size": 1874, "ext": "js", "max_stars_repo_path": "react-client/src/components/AnswerCard/AnswerCard.test.js", "max_stars_repo_name": "natbibi/Quizzical", "max_stars_repo_stars_event_min_datetime": "2021-04-30T15:40:38.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-08T08:47:56.000Z", "max_issues_repo_path": "react-client/src/components/AnswerCard/AnswerCard.test.js", "max_issues_repo_name": "natbibi/Quizzical", "max_issues_repo_issues_event_min_datetime": "2021-04-23T14:17:45.000Z", "max_issues_repo_issues_event_max_datetime": "2021-04-30T12:41:49.000Z", "max_forks_repo_path": "react-client/src/components/AnswerCard/AnswerCard.test.js", "max_forks_repo_name": "natbibi/Quizzical", "max_forks_repo_forks_event_min_datetime": "2021-04-30T20:54:57.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-11T12:51:05.000Z"}
{"max_stars_count": 3, "max_issues_count": 41, "max_forks_count": 4, "avg_line_length": 37.48, "max_line_length": 76, "alphanum_fraction": 0.5805763074}
// import AnswerCard from ".";
// import { screen } from "@testing-library/react";

  

    // test("it renders a button", () => {
    //     const fakeprops= {index:0}
    //     renderWithReduxProvider(<AnswerCard props={fakeprops}/>);
    //     let btn = screen.getByRole('button', { name: 'answer' })
    //     expect(btn).toBeInTheDocument();
    //   });
    


    //   test("it renders a a final answer button", () => {
    //     const fakeprops= {index:5}
    //     renderWithReduxProvider(<AnswerCard props={fakeprops}/>);
    //     let btn = screen.getByRole('button', { name: 'finalAnswer' })
    //     expect(btn).toBeInTheDocument();
    //   });
    

    import { default as AnswerCard } from ".";
    import { screen, render } from "@testing-library/react";
    // import userEvent from "@testing-library/user-event";
    // import { MemoryRouter } from "react-router-dom";
    describe("AnswerCard", () => {
      beforeEach(() => {
        renderWithReduxProvider(<AnswerCard result={resultStub} />);
        const resultStub =  ["Paris", "Madrid", "London", "New York"];
      });
      test("it renders a button for the answer cards", () => {
        let button = screen.getByRole("button", { name: /'next-button'/i });
        expect(button).toBeInTheDocument();
      });
      test("it shows the incorrect answer in the results", async () => {
        const incorrectAnswer = await screen.findByText("London");
        expect(incorrectAnswer).toBeInTheDocument();
      });
      test("it shows the correct answer in the results", async () => {
        const correct = await screen.findByText("Paris");
        expect(correct).toBeInTheDocument();
      });
      // test("it renders answer cards", () => {
      //   let answerCard = screen.getByTestId("answer-cards");
      //   expect(answerCard).toBeInTheDocument();
      // });
    });

