aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/App.test.tsx
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-07-14 10:36:10 +0400
committerGravatar GitHub <[email protected]>2022-07-14 10:36:10 +0400
commitf2a4307467c4ce0e6d23a97c382d714ed955732b (patch)
tree3a23e602e06edc57b02f4d37050f280e04360536 /src/tests/App.test.tsx
parentMerge pull request #477 from python-discord/update-refresh-timeout-logic (diff)
parentFix Failing jest.spyOn (diff)
Merge pull request #483 from python-discord/dependabot/npm_and_yarn/swc/core-1.2.213
Bump @swc/core from 1.2.204 to 1.2.213
Diffstat (limited to 'src/tests/App.test.tsx')
-rw-r--r--src/tests/App.test.tsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tests/App.test.tsx b/src/tests/App.test.tsx
index 4765f87..9ee1ec7 100644
--- a/src/tests/App.test.tsx
+++ b/src/tests/App.test.tsx
@@ -1,9 +1,13 @@
import React from "react";
-import { render } from "@testing-library/react";
+import {act, render, waitFor} from "@testing-library/react";
import App from "../App";
-test("renders app to body", () => {
- const { container } = render(<App />);
- expect(container).toBeInTheDocument();
+test("renders app to body", async () => {
+ await act(async () => {
+ const {container} = render(<App/>);
+ await waitFor(() => {
+ expect(container).toBeInTheDocument();
+ });
+ });
});