TESTS: Prevent some test spam (#1126)

This commit is contained in:
Snarling
2024-02-26 08:22:33 -05:00
committed by GitHub
parent 373ced2efe
commit 91105c6d8c
6 changed files with 27 additions and 26 deletions

View File

@@ -24,6 +24,7 @@ function grabCost<API>(ramEntry: RamCostTree<API>[keyof API]) {
}
describe("Netscript RAM Calculation/Generation Tests", function () {
jest.spyOn(console, "warn").mockImplementation(() => {});
Player.sourceFiles.set(4, 3);
// For simulating costs of singularity functions.
const baseCost = RamCostConstants.Base;
@@ -44,7 +45,9 @@ describe("Netscript RAM Calculation/Generation Tests", function () {
function tryFunction(fn: PotentiallyAsyncFunction) {
try {
fn()?.catch?.(() => undefined);
} catch {}
} catch {
// Intentionally empty
}
}
let scriptRef = createRunningScript("");