Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Commit

Permalink
Fix the first test
Browse files Browse the repository at this point in the history
The test need to be async since the implementation is async
  • Loading branch information
fabien0102 committed Dec 13, 2019
1 parent d10cbe4 commit a30a05b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Get.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ describe("Get", () => {
});
});
describe("refetch after update", () => {
it("should not refetch when base, path or resolve don't change", () => {
it("should not refetch when base, path or resolve don't change", async () => {
let apiCalls = 0;
nock("https://my-awesome-api.fake")
.get("/")
Expand All @@ -678,7 +678,7 @@ describe("Get", () => {
<Get path="">{children}</Get>
</RestfulProvider>,
);
expect(apiCalls).toEqual(1);
await wait(() => expect(apiCalls).toEqual(1));
});

it("should rewrite the base and handle path accordingly", async () => {
Expand Down

0 comments on commit a30a05b

Please sign in to comment.