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

9
test/jest-e2e.json Normal file
View File

@@ -0,0 +1,9 @@
{
"moduleFileExtensions": ["js", "json", "ts"],
"rootDir": ".",
"testEnvironment": "node",
"testRegex": ".e2e-spec.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
}
}