16 lines
474 B
JavaScript
16 lines
474 B
JavaScript
const path = require('path');
|
|
const fs = require('fs');
|
|
|
|
module.exports = async function globalTeardown() {
|
|
console.log('\n=== 全局测试环境清理 ===');
|
|
|
|
// 清理状态文件
|
|
const stateFile = path.resolve(__dirname, '.test-state.json');
|
|
if (fs.existsSync(stateFile)) {
|
|
fs.unlinkSync(stateFile);
|
|
}
|
|
|
|
// 注意:不主动关闭 IDE,保持开发者工具运行以便后续使用
|
|
console.log('测试环境清理完成(IDE 保持运行)');
|
|
};
|