From a74e1c6e4c51295649f654722cbdcd90f40fe0ed Mon Sep 17 00:00:00 2001 From: Sergey Kozlov Date: Thu, 25 Aug 2022 19:35:48 +0300 Subject: [PATCH] add tests for useForceUpdate --- .../utils/__tests__/use-force-update.test.tsx | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 packages/utils/__tests__/use-force-update.test.tsx diff --git a/packages/utils/__tests__/use-force-update.test.tsx b/packages/utils/__tests__/use-force-update.test.tsx new file mode 100644 index 000000000..5624b85bb --- /dev/null +++ b/packages/utils/__tests__/use-force-update.test.tsx @@ -0,0 +1,34 @@ +/// + +import * as React from "react"; +import { render, cleanup, userEvent } from "@reach-internal/test/utils"; +import { afterEach, describe, expect, it } from "vitest"; +import { useForceUpdate } from "@reach/utils"; + +afterEach(cleanup); + +describe("useForceUpdate", () => { + it("TODO", async () => { + let nonObservableVariable = "foo"; + + const Test = () => { + const forceUpdate = useForceUpdate(); + return ( + <> +
{nonObservableVariable}
+