fmt + output
This commit is contained in:
parent
59ddf6dda9
commit
8daaed1ef9
@ -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,11 +94,14 @@ function createJSDOMForOpponent(opponent, name, mode, testString, config, localS
|
||||
results.push(args[2]);
|
||||
window.close();
|
||||
resolve(); // 解决Promise,表示当前JSDOM操作完成
|
||||
}
|
||||
};
|
||||
window.output = (...message) => {
|
||||
console.log('page:', message);
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
console.log(chalk`{gray child {bold ${id}} started.}`);
|
||||
process.on('message', ([mode, name]) => {
|
||||
|
||||
@ -123,8 +127,8 @@ process.on('message', ([mode, name]) => {
|
||||
};
|
||||
}
|
||||
});
|
||||
}else if(mode == "CQD"){
|
||||
var results=[];
|
||||
} else if (mode == "CQD") {
|
||||
var results = [];
|
||||
(async () => {
|
||||
for (let i = 0; i < cqd_name_list.length; i++) {
|
||||
var opponent = cqd_name_list[i];
|
||||
|
Loading…
Reference in New Issue
Block a user