fmt!
This commit is contained in:
parent
6a3a9098a4
commit
5e8d35cd38
@ -12337,7 +12337,9 @@
|
|||||||
async_goto = 6
|
async_goto = 6
|
||||||
break
|
break
|
||||||
case 8:
|
case 8:
|
||||||
if (C.Array.w(o, n.a(f.a[0]).e.gb2())) ++p.win_count;
|
if (C.Array.w(o, n.a(f.a[0]).e.gb2())) {
|
||||||
|
++p.win_count
|
||||||
|
};
|
||||||
++i;
|
++i;
|
||||||
++p.current_count
|
++p.current_count
|
||||||
async_goto = 3
|
async_goto = 3
|
||||||
@ -12360,6 +12362,7 @@
|
|||||||
}
|
}
|
||||||
q = new T.aq(n, l)
|
q = new T.aq(n, l)
|
||||||
|
|
||||||
|
// 当前场次, 目标场次, 胜率
|
||||||
output(p.current_count, p.target_count, p.win_count * 100 / p.current_count)
|
output(p.current_count, p.target_count, p.win_count * 100 / p.current_count)
|
||||||
//捕获胜率
|
//捕获胜率
|
||||||
if (p.current_count >= config[stage].count) {
|
if (p.current_count >= config[stage].count) {
|
||||||
|
@ -1,26 +1,28 @@
|
|||||||
const { JSDOM } = require('jsdom');
|
const {
|
||||||
const jsdom=require('jsdom');
|
JSDOM
|
||||||
|
} = require('jsdom');
|
||||||
|
const jsdom = require('jsdom');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
async function test(str){
|
async function test(str) {
|
||||||
const localStorageMock = {
|
const localStorageMock = {
|
||||||
setItem: function (key, value) {
|
setItem: function (key, value) {
|
||||||
this[key] = value;
|
this[key] = value;
|
||||||
},
|
},
|
||||||
getItem: function (key) {
|
getItem: function (key) {
|
||||||
return this[key] || null;
|
return this[key] || null;
|
||||||
},
|
},
|
||||||
removeItem: function (key) {
|
removeItem: function (key) {
|
||||||
delete this[key];
|
delete this[key];
|
||||||
},
|
},
|
||||||
clear: function () {
|
clear: function () {
|
||||||
for (const key in this) {
|
for (const key in this) {
|
||||||
if (this.hasOwnProperty(key) && key !== 'setItem' && key !== 'getItem' && key !== 'removeItem' && key !== 'clear') {
|
if (this.hasOwnProperty(key) && key !== 'setItem' && key !== 'getItem' && key !== 'removeItem' && key !== 'clear') {
|
||||||
delete this[key];
|
delete this[key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
// 在你的 JSDOM 初始化代码之前
|
// 在你的 JSDOM 初始化代码之前
|
||||||
let resolvePromise;
|
let resolvePromise;
|
||||||
@ -32,12 +34,15 @@ async function test(str){
|
|||||||
const virtualConsole = new jsdom.VirtualConsole();
|
const virtualConsole = new jsdom.VirtualConsole();
|
||||||
const dom = new JSDOM(fs.readFileSync(path.join(__dirname, 'static/md5.html'), 'utf-8'), {
|
const dom = new JSDOM(fs.readFileSync(path.join(__dirname, 'static/md5.html'), 'utf-8'), {
|
||||||
url: 'file://' + path.join(__dirname, 'static/'),
|
url: 'file://' + path.join(__dirname, 'static/'),
|
||||||
console:virtualConsole,
|
console: virtualConsole,
|
||||||
runScripts: 'dangerously',
|
runScripts: 'dangerously',
|
||||||
resources: 'usable',
|
resources: 'usable',
|
||||||
beforeParse(window) {
|
beforeParse(window) {
|
||||||
window.FakelocalStorage = localStorageMock;
|
window.FakelocalStorage = localStorageMock;
|
||||||
window.config =[{"count":11000,"score":10}];
|
window.config = [{
|
||||||
|
"count": 12000,
|
||||||
|
"score": 10
|
||||||
|
}];
|
||||||
window.name_input = str;
|
window.name_input = str;
|
||||||
window.stage = 0;
|
window.stage = 0;
|
||||||
window.skillData = [];
|
window.skillData = [];
|
||||||
@ -62,6 +67,5 @@ async function test(str){
|
|||||||
|
|
||||||
|
|
||||||
//str="!test!\n!\n\n11@qwerb\n\n1233";
|
//str="!test!\n!\n\n11@qwerb\n\n1233";
|
||||||
str="!test!\n!\n\n11@qwerb\n\n1233";
|
str = "!test!\n!\n\n11@qwerb\n\n1233";
|
||||||
test(str)
|
test(str)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user