安装yarn add @testing-library/react-hooks msw -D 使用在src下面新建一个文件夹__test__(双下划线) 传统的单元测试传统的单元测试通常来测一个方法或者函数: