1.0.11 • Published 1 year ago
zhooks v1.0.11
hooks
// import { renderHook } from "@testing-library/react-hooks"; // import useOnGlobalEvent from "../index";
// describe("useOnGlobalEvent", () => {
// it("should be defined", () => {
// expect(useOnGlobalEvent).toBeDefined();
// });
// it("with argument", () => {
// const hook = renderHook(() =>
// useOnGlobalEvent("mousemove", (e) => {
// console.log((${e.x}, ${e.y})
);
// })
// );
// console.log(hook.result.current);
// // expect(hook.result.current.width).toEqual(0);
// // expect(hook.result.current.height).toEqual(0);
// });
// });