mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-02-08 21:59:39 +01:00
17 lines
393 B
TypeScript
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)
|
|
})
|
|
})
|