我有一个组件库,我正在为使用Jest和react-testing-library编写单元测试.基于某些道具或事件,我想验证某些元素没有被渲染.
getByText,getByTestId等扔在错误react-testing-library如果未找到该元素,导致测试的前失效expect功能火灾.
getByText
getByTestId
react-testing-library
expect
你如何使用react-testing-library测试不存在于jest中的东西?
reactjs jestjs react-testing-library
jestjs ×1
react-testing-library ×1
reactjs ×1