We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5784cb commit 8aee286Copy full SHA for 8aee286
content/docs/testing-recipes.md
@@ -465,20 +465,20 @@ import { act } from "react-dom/test-utils";
465
466
import Card from "./card";
467
468
-jest.useFakeTimers();
469
-
470
let container = null;
471
beforeEach(() => {
472
// setup a DOM element as a render target
473
container = document.createElement("div");
474
document.body.appendChild(container);
+ jest.useFakeTimers();
475
});
476
477
afterEach(() => {
478
// cleanup on exiting
479
unmountComponentAtNode(container);
480
container.remove();
481
container = null;
+ jest.useRealTimers();
482
483
484
it("should select null after timing out", () => {
0 commit comments