增加 后端,后台管理系统,uniapp会员端的自动化测试。

This commit is contained in:
2026-07-21 18:09:29 +08:00
parent df0e68469b
commit 6b60b3b4da
64 changed files with 13095 additions and 376 deletions
+18
View File
@@ -0,0 +1,18 @@
const path = require('path');
const fs = require('fs');
module.exports = async function globalSetup() {
const port = parseInt(process.env.WECHAT_DEVTOOLS_PORT || '63956', 10);
// 将共享配置写入临时文件,供测试套件读取
const stateFile = path.resolve(__dirname, '.test-state.json');
fs.writeFileSync(stateFile, JSON.stringify({
port,
launched: true,
timestamp: Date.now()
}), 'utf8');
console.log('\n=== 全局测试环境初始化 ===');
console.log('服务端口:', port);
console.log('状态文件:', stateFile);
};