diff --git a/src/Get.test.tsx b/src/Get.test.tsx
new file mode 100644
index 00000000..9b7c5e86
--- /dev/null
+++ b/src/Get.test.tsx
@@ -0,0 +1,145 @@
+import "isomorphic-fetch";
+import "jest-dom/extend-expect";
+import nock from "nock";
+import React from "react";
+import { cleanup, render, wait } from "react-testing-library";
+
+import { Get, RestfulProvider } from "./index";
+
+afterEach(() => {
+ cleanup();
+ nock.cleanAll();
+});
+
+describe("Get", () => {
+ describe("classic usage", () => {
+ it("should call the url set in provider", async () => {
+ nock("https://my-awesome-api.fake")
+ .get("/")
+ .reply(200);
+
+ const children = jest.fn();
+ children.mockReturnValue(
);
+
+ render(
+
+ {children}
+ ,
+ );
+
+ await wait(() => expect(children.mock.calls.length).toBe(3));
+ });
+
+ it("should compose the url with the base", async () => {
+ nock("https://my-awesome-api.fake")
+ .get("/plop")
+ .reply(200);
+
+ const children = jest.fn();
+ children.mockReturnValue();
+
+ render(
+
+ {children}
+ ,
+ );
+
+ await wait(() => expect(children.mock.calls.length).toBe(3));
+ });
+
+ it("should set loading to `true` on mount", async () => {
+ nock("https://my-awesome-api.fake")
+ .get("/")
+ .reply(200);
+
+ const children = jest.fn();
+ children.mockReturnValue();
+
+ render(
+
+ {children}
+ ,
+ );
+
+ await wait(() => expect(children.mock.calls.length).toBe(3));
+ expect(children.mock.calls[0][1].loading).toEqual(true);
+ });
+
+ it("should set loading to `false` on data", async () => {
+ nock("https://my-awesome-api.fake")
+ .get("/")
+ .reply(200, { hello: "world" });
+
+ const children = jest.fn();
+ children.mockReturnValue();
+
+ render(
+
+ {children}
+ ,
+ );
+
+ await wait(() => expect(children.mock.calls.length).toBe(3));
+ expect(children.mock.calls[2][1].loading).toEqual(false);
+ });
+
+ it("should send data on data", async () => {
+ nock("https://my-awesome-api.fake")
+ .get("/")
+ .reply(200, { hello: "world" });
+
+ const children = jest.fn();
+ children.mockReturnValue();
+
+ render(
+
+ {children}
+ ,
+ );
+
+ await wait(() => expect(children.mock.calls.length).toBe(3));
+ expect(children.mock.calls[2][0]).toEqual({ hello: "world" });
+ });
+ });
+
+ describe("with custom resolver", () => {
+ it("should transform data", async () => {
+ nock("https://my-awesome-api.fake")
+ .get("/")
+ .reply(200, { hello: "world" });
+
+ const children = jest.fn();
+ children.mockReturnValue();
+
+ render(
+
+ ({ ...data, foo: "bar" })}>
+ {children}
+
+ ,
+ );
+
+ await wait(() => expect(children.mock.calls.length).toBe(3));
+ expect(children.mock.calls[2][0]).toEqual({ hello: "world", foo: "bar" });
+ });
+ });
+
+ describe("with lazy", () => {
+ it("should not fetch on mount", async () => {
+ const children = jest.fn();
+ children.mockReturnValue();
+
+ render(
+
+
+ {children}
+
+ ,
+ );
+
+ await wait(() => expect(children.mock.calls.length).toBe(1));
+ expect(children.mock.calls[0][1].loading).toBe(false);
+ expect(children.mock.calls[0][0]).toBe(null);
+ });
+ });
+});