import { renderHook } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import { usePreventScroll } from "./index";
describe("usePreventScroll", () => {
    it("should prevent scroll when active", () => {
        let { unmount } = renderHook(() => usePreventScroll(true));
        expect(document.body.style.overflow).toBe("hidden");
        unmount();
        expect(document.body.style.overflow).toBe("");
    });
    it("should not prevent scroll when inactive", () => {
        renderHook(() => usePreventScroll(false));
        expect(document.body.style.overflow).not.toBe("hidden");
    });
});
