Skip to content

Commit bbc4d55

Browse files
committed
feat: Update tests to improve rendering checks and add Home component tests
1 parent 5f054ec commit bbc4d55

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

test/app.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { render, screen } from "@testing-library/react";
1+
import { render } from "@testing-library/react";
22
import { describe, expect, it } from "vitest";
33
import { App } from "~/App";
44

55
describe("App", () => {
6-
it("it should be render", () => {
7-
render(<App />);
8-
expect(screen.getByText("Imprint")).toBeInTheDocument();
6+
it("should render skeleton", () => {
7+
const { getByText } = render(<App />);
8+
expect(getByText("Imprint")).toBeInTheDocument();
99
});
1010
});

test/home.test.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { render, waitFor } from "@testing-library/react";
2+
import { describe, expect, it } from "vitest";
3+
import { App } from "~/App";
4+
5+
describe("Home", () => {
6+
it("should render Home with data", async () => {
7+
const { getByText } = render(<App />);
8+
9+
await waitFor(() => {
10+
expect(getByText("Application Services")).toBeInTheDocument();
11+
}, { timeout: 6000 });
12+
}, 6000);
13+
});

0 commit comments

Comments
 (0)