增加 后端,后台管理系统,uniapp会员端的自动化测试。
This commit is contained in:
@@ -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);
|
||||
};
|
||||
Reference in New Issue
Block a user