|
@@ -1,4 +1,3 @@
|
|
|
-import React from "react";
|
|
|
import { render, waitFor } from "@testing-library/react";
|
|
|
import ApiInfo from "../ApiInfo";
|
|
|
import { getStatus } from "../../../domain/apiMethods";
|
|
@@ -18,7 +17,9 @@ describe("ApiInfo", () => {
|
|
|
version: "test",
|
|
|
});
|
|
|
const { container, getByText } = render(<ApiInfo />);
|
|
|
- await waitFor(() => expect(getByText("API Version: test")).toBeInTheDocument())
|
|
|
+ await waitFor(() =>
|
|
|
+ expect(getByText("API Version: test")).toBeInTheDocument()
|
|
|
+ );
|
|
|
expect(container.firstChild).toMatchSnapshot();
|
|
|
});
|
|
|
|
|
@@ -28,7 +29,11 @@ describe("ApiInfo", () => {
|
|
|
version: "test",
|
|
|
});
|
|
|
const { container, getByText } = render(<ApiInfo />);
|
|
|
- await waitFor(() => expect(getByText("Unable to communicate with API server! Error: unhealthy")).toBeInTheDocument())
|
|
|
+ await waitFor(() =>
|
|
|
+ expect(
|
|
|
+ getByText("Unable to communicate with API server! Error: unhealthy")
|
|
|
+ ).toBeInTheDocument()
|
|
|
+ );
|
|
|
expect(container.firstChild).toMatchSnapshot();
|
|
|
});
|
|
|
});
|