Skip to content

Commit

Permalink
test: excluding a test function in listarIdosos file
Browse files Browse the repository at this point in the history
  • Loading branch information
GustaaSZ committed Sep 18, 2024
1 parent 1141e20 commit f88ec6c
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/app/__tests__/listarIdosos.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,7 @@ describe("ListarIdosos", () => {
await waitFor(() => expect(getByText("Idoso 1")).toBeTruthy());
expect(getByText("Idoso 2")).toBeTruthy();
});

// it("deve exibir uma mensagem de erro se a chamada da API falhar", async () => {
// const errorMessage = "Erro ao buscar idosos";

// // Simula um erro na chamada da API
// (getAllIdoso as jest.Mock).mockRejectedValueOnce({ message: errorMessage });

// const { queryByText } = render(<ListarIdosos />);

// // Aguarda a resolução da promessa
// await waitFor(() => expect(getAllIdoso).toHaveBeenCalled(), { timeout: 5000 });

// // Verifica se a mensagem de erro é exibida
// expect(queryByText(errorMessage)).toBeNull(); // Ajuste se a mensagem de erro é realmente exibida
// });


test("Navega para a tela anterior ao clicar no botão de voltar", async () => {
// Renderiza o componente ListarIdosos
const { getByTestId } = render(<ListarIdosos />);
Expand Down

0 comments on commit f88ec6c

Please sign in to comment.