contiamo / restful-react

A consistent, declarative way of interacting with RESTful backends, featuring code-generation from Swagger and OpenAPI specs 🔥
MIT License
1.87k stars 109 forks source link

Jest fails when using RestfulProvider #194

Closed Yuhhang closed 4 years ago

Yuhhang commented 4 years ago

Jest fails when using RestfulProvider.

My jest config is default using create-react-app. To Reproduce test code:

import React from "react";
import { render } from "@testing-library/react";
import App from "../App";

it("renders index", () => {
  const { getByText } = render(<App />);
  expect(getByText("index")).toBeInTheDocument();
});

Screenshots image

image

image

TejasQ commented 4 years ago

This is actually the same issue as #201. Let's continue the discussion there.