我已经编写了简单的react-apollo组件,它使用graphql查询从模式中检索数据。On execution组件运行良好,但是,当我使用jest框架和MockedProvider为该组件编写测试用例时(即react-apollo/ test -utils的组件)。我在MockedProvider上引用了这篇文章://MyComponen
我有一个前端的反应和阿波罗客户端,并试图写一些简单的测试。import { createHttpLink } from "apollo-link-http"
import { ApolloProvider } from "@apollo/react-hooks,并尝试添加@apollo/react-testing。我还尝试在测试中使用较低的组件(Home),但得到了相同的错误。Wrap the root componen
在执行React Native应用程序后,我遇到了这个错误:Could not find "client" in the context or props of Mutation.这是我的阿波罗客户import { ApolloClient, InMemoryCache } from "@apollouri: host,});
下面是包装我的根组件