fix(e2e): 修复ESM模式下__dirname未定义导致Staging E2E失败 #647
Reference in New Issue
Block a user
Delete Branch "fix/e2e-esm-dirname"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
Staging E2E 100%失败,2个上传类用例挂掉:
错误:
根因
Playwright 在 ESM 模式下运行,CommonJS 的
__dirname全局变量不存在。修复
使用 ESM 兼容方式获取当前目录:
影响范围
只修改2个E2E测试文件,不影响业务代码。
CI全绿,自动审批通过。
CI全绿,自动审批通过。
🗑️ 预览环境已清理
PR #647 已关闭或合并,对应的预览环境已被清理。