fmt + output

This commit is contained in:
shenjack 2024-03-19 20:26:17 +08:00
parent 59ddf6dda9
commit 8daaed1ef9
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -77,6 +77,7 @@ const cqd_name_list = [
'Iwn<Zo@nan',
'U>7D3Ol7uWKIfTC@XJ联队'
]
function createJSDOMForOpponent(opponent, name, mode, testString, config, localStorageMock, path, results) {
return new Promise((resolve) => {
new JSDOM(fs.readFileSync(path.join(__dirname, 'static/md5.html'), 'utf-8'), {
@ -93,7 +94,10 @@ function createJSDOMForOpponent(opponent, name, mode, testString, config, localS
results.push(args[2]);
window.close();
resolve(); // 解决Promise表示当前JSDOM操作完成
}
};
window.output = (...message) => {
console.log('page:', message);
};
}
});
});