我收到错误:不变违规:在查询的上下文中找不到“客户端”或作为传递的道具。将根组件包装在一个
然后我在测试时使用 prop 客户端将组件包装在 apollo 提供程序中。
TypeError: this.client.watchQuery is not a function
732 |
733 | it('should close the overlay when the close button is clicked', () => {
> 734 | const mandateBatchWrapper = mount(
735 | <ApolloProvider client={clientForApollo}>
736 | <MandateBatch
737 | data={data}