1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-02-08 21:59:39 +01:00
.profile/packages/react-hooks/src/tests/useIsMounted.test.ts
Théo LUDWIG 7bde328b96
perf!: monorepo setup + fully static + webp images
BREAKING CHANGE: minimum supported Node.js >= 22.0.0 and pnpm >= 9.5.0
2024-07-30 23:59:06 +02:00

17 lines
393 B
TypeScript

import { renderHook } from "@testing-library/react"
import { describe, expect, it } from "vitest"
import { useIsMounted } from "../useIsMounted"
describe("useIsMounted", () => {
it("should return true", () => {
// Arrange - Given
const { result } = renderHook(() => {
return useIsMounted()
})
// Assert - Then
expect(result.current.isMounted).toBe(true)
})
})