文章目录
- 安装yarn
- 安装jest
- vscode支持jest的智能提示
- 创建JS测试用例
安装yarn
- yarn是meta发布的一款取代npm的包管理工具。
npm install -g yarn
- 查看yarn软件源
yarn config get registry
- 换源
yarn config set registry https://registry.npmmirror.com
- 恢复官方源
yarn config set registry https://registry.yarnpkg.com
安装jest
yarn add jest
vscode支持jest的智能提示
yarn add @types/jest
创建JS测试用例
只需要创建后缀为.test.js的文件即可









![[统计分析] 出现典型锯齿图的一种情况;资源泄露](https://i-blog.csdnimg.cn/direct/44cbae8686db4569a98d803dce3dd4b0.png#pic_center)






![[C++]使用纯opencv部署yolov8-cls图像分类onnx模型](https://i-blog.csdnimg.cn/direct/9baa1cb73ac048cea1cbac6fd15232e9.jpeg)



