mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
NETSCRIPT: Don't make dynamicLoadedFns entries for free functions. (#1617)
This commit is contained in:
@@ -103,7 +103,9 @@ describe("Netscript RAM Calculation/Generation Tests", function () {
|
||||
throw new Error(`Invalid function specified: [${fnPath.toString()}]`);
|
||||
}
|
||||
|
||||
expect(workerScript.dynamicLoadedFns).toHaveProperty(fnName);
|
||||
if (expectedRamCost !== 0) {
|
||||
expect(workerScript.dynamicLoadedFns).toHaveProperty(fnName);
|
||||
}
|
||||
expect(workerScript.dynamicRamUsage).toBeCloseTo(Math.min(expectedRamCost + baseCost, maxCost), 5);
|
||||
expect(workerScript.dynamicRamUsage).toBeCloseTo(scriptRef.ramUsage - extraLayerCost, 5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user