我使用client.query()方法从服务器进行查询。我想使用MockProvider为这个功能编写测试。由于client.query()的异步特性,我面临着一些问题 // I am writing the query as follow
const { data, loading } = await
除非我弄错了,否则我相信我已经发现了@testing-library/react包如何触发重发程序(或者在本例中不是)的错误。,但它说明了我的观点):import { useAppSelector } from "..boolean state value in this component
// somewhat a dumb example but
在使用Jest运行测试套件时,我遇到了警告,这些警告要求我更新包:npm WARN deprecated react-testing-library@5.9.0: react-testing-library has moved to @testing-libraryPlease uninstall react-testing-librar
我的应用程序如下所示: ApolloProvider.js import React from "react"import { render } from "@testing-library/react"
import App from ".我还尝试在测试中使用较低的组件(Home),但得到了相同<e