@hyper-fetch/react
Version:
React hooks and utils for the hyper-fetch
37 lines (29 loc) • 781 B
text/typescript
import { createHttpMockingServer } from "@hyper-fetch/testing";
import { client } from "../../utils";
const { resetMocks, startServer, stopServer } = createHttpMockingServer();
describe("useFetch [ Pagination ]", () => {
beforeAll(() => {
startServer();
});
afterEach(() => {
resetMocks();
});
afterAll(() => {
stopServer();
});
beforeEach(() => {
vi.resetModules();
client.clear();
});
describe("when request query params are changed", () => {
it("should allow to see previous results until new page is loaded", async () => {
// TODO
});
it("should not override previous results by initialData", async () => {
// TODO
});
it("should cache pages on change", async () => {
// TODO
});
});
});