• + 0 comments

    I believe there is a problem with the initial test case.

    Note that the articles are tested against the mostUpvotedArticles. If we do not fireEvent.click(mostUpvotedLink), articles will never equal to mostUpvotedLink.

    Correct me if I am wrong?

    test("Initial articles render correctly", () => {
      const { queryAllByTestId } = renderApp();
    
      const articles = queryAllByTestId(testIds.article);
      expectArticles(articles, mostUpvotedArticles);
    });