feat: 为爬虫测试添加代理支持并通过环境变量配置

添加dotenv依赖,创建jest配置文件和setup文件
修改所有爬虫测试文件以支持通过环境变量配置代理
将jest配置从package.json移动到独立文件
This commit is contained in:
dmy
2026-01-12 15:19:54 +08:00
parent f1ec37143c
commit b1435523e8
17 changed files with 325 additions and 27 deletions

2
jest.setup.js Normal file
View File

@@ -0,0 +1,2 @@
// 加载环境变量
require('dotenv').config({ path: '.env' });