JEST: Decrease frequency of random Bladeburner Tests by ~59% for improved performance (#1648)

This commit is contained in:
Marvin Sautter 2024-09-10 03:33:37 +02:00 committed by GitHub
parent 2a5b0ca4e9
commit dd59612121
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,13 +19,13 @@ describe("Test calculateMaxUpgradeCount", function () {
let errorCount = 0; let errorCount = 0;
const test1Errors = []; const test1Errors = [];
const test2Errors = []; const test2Errors = [];
for (let i = 0; i < 10; ++i) { for (let i = 0; i < 8; ++i) {
skill.baseCost = getRandomIntInclusive(1, 1000); skill.baseCost = getRandomIntInclusive(1, 1000);
for (let j = 0; j < 10; ++j) { for (let j = 0; j < 8; ++j) {
skill.costInc = randomInRange(1, 1000); skill.costInc = randomInRange(1, 1000);
for (let k = 0; k < 10; ++k) { for (let k = 0; k < 8; ++k) {
currentNodeMults.BladeburnerSkillCost = randomInRange(1, 1000); currentNodeMults.BladeburnerSkillCost = randomInRange(1, 1000);
for (let m = 0; m < 1e4; ++m) { for (let m = 0; m < 8000; ++m) {
const currentLevel = getRandomIntInclusive(0, 1e9); const currentLevel = getRandomIntInclusive(0, 1e9);
let count = 0; let count = 0;
let cost = 0; let cost = 0;