mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 14:59:16 +02:00
fix test suite
This commit is contained in:
@@ -623,13 +623,13 @@ describe("Netscript Dynamic RAM Calculation/Generation Tests", function () {
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("stock.buy()", async function () {
|
||||
const f = ["stock", "buy"];
|
||||
it("stock.buyStock()", async function () {
|
||||
const f = ["stock", "buyStock"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("stock.sell()", async function () {
|
||||
const f = ["stock", "sell"];
|
||||
it("stock.sellStock()", async function () {
|
||||
const f = ["stock", "sellStock"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
@@ -681,187 +681,187 @@ describe("Netscript Dynamic RAM Calculation/Generation Tests", function () {
|
||||
|
||||
describe("Singularity Functions", function () {
|
||||
it("universityCourse()", async function () {
|
||||
const f = ["universityCourse"];
|
||||
const f = ["singularity", "universityCourse"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("gymWorkout()", async function () {
|
||||
const f = ["gymWorkout"];
|
||||
const f = ["singularity", "gymWorkout"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("travelToCity()", async function () {
|
||||
const f = ["travelToCity"];
|
||||
const f = ["singularity", "travelToCity"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("purchaseTor()", async function () {
|
||||
const f = ["purchaseTor"];
|
||||
const f = ["singularity", "purchaseTor"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("purchaseProgram()", async function () {
|
||||
const f = ["purchaseProgram"];
|
||||
const f = ["singularity", "purchaseProgram"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getStats()", async function () {
|
||||
const f = ["getStats"];
|
||||
const f = ["singularity", "getStats"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getDarkwebProgramCost()", async function () {
|
||||
const f = ["getDarkwebProgramCost"];
|
||||
const f = ["singularity", "getDarkwebProgramCost"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getDarkwebPrograms()", async function () {
|
||||
const f = ["getDarkwebPrograms"];
|
||||
const f = ["singularity", "getDarkwebPrograms"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getCharacterInformation()", async function () {
|
||||
const f = ["getCharacterInformation"];
|
||||
const f = ["singularity", "getCharacterInformation"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("isBusy()", async function () {
|
||||
const f = ["isBusy"];
|
||||
const f = ["singularity", "isBusy"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("stopAction()", async function () {
|
||||
const f = ["stopAction"];
|
||||
const f = ["singularity", "stopAction"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("upgradeHomeRam()", async function () {
|
||||
const f = ["upgradeHomeRam"];
|
||||
const f = ["singularity", "upgradeHomeRam"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getUpgradeHomeRamCost()", async function () {
|
||||
const f = ["getUpgradeHomeRamCost"];
|
||||
const f = ["singularity", "getUpgradeHomeRamCost"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("workForCompany()", async function () {
|
||||
const f = ["workForCompany"];
|
||||
const f = ["singularity", "workForCompany"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("applyToCompany()", async function () {
|
||||
const f = ["applyToCompany"];
|
||||
const f = ["singularity", "applyToCompany"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getCompanyRep()", async function () {
|
||||
const f = ["getCompanyRep"];
|
||||
const f = ["singularity", "getCompanyRep"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getCompanyFavor()", async function () {
|
||||
const f = ["getCompanyFavor"];
|
||||
const f = ["singularity", "getCompanyFavor"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getCompanyFavorGain()", async function () {
|
||||
const f = ["getCompanyFavorGain"];
|
||||
const f = ["singularity", "getCompanyFavorGain"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("checkFactionInvitations()", async function () {
|
||||
const f = ["checkFactionInvitations"];
|
||||
const f = ["singularity", "checkFactionInvitations"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("joinFaction()", async function () {
|
||||
const f = ["joinFaction"];
|
||||
const f = ["singularity", "joinFaction"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("workForFaction()", async function () {
|
||||
const f = ["workForFaction"];
|
||||
const f = ["singularity", "workForFaction"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getFactionRep()", async function () {
|
||||
const f = ["getFactionRep"];
|
||||
const f = ["singularity", "getFactionRep"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getFactionFavor()", async function () {
|
||||
const f = ["getFactionFavor"];
|
||||
const f = ["singularity", "getFactionFavor"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getFactionFavorGain()", async function () {
|
||||
const f = ["getFactionFavorGain"];
|
||||
const f = ["singularity", "getFactionFavorGain"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("donateToFaction()", async function () {
|
||||
const f = ["donateToFaction"];
|
||||
const f = ["singularity", "donateToFaction"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("createProgram()", async function () {
|
||||
const f = ["createProgram"];
|
||||
const f = ["singularity", "createProgram"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("commitCrime()", async function () {
|
||||
const f = ["commitCrime"];
|
||||
const f = ["singularity", "commitCrime"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getCrimeChance()", async function () {
|
||||
const f = ["getCrimeChance"];
|
||||
const f = ["singularity", "getCrimeChance"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getOwnedAugmentations()", async function () {
|
||||
const f = ["getOwnedAugmentations"];
|
||||
const f = ["singularity", "getOwnedAugmentations"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getOwnedSourceFiles()", async function () {
|
||||
const f = ["getOwnedSourceFiles"];
|
||||
const f = ["singularity", "getOwnedSourceFiles"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getAugmentationsFromFaction()", async function () {
|
||||
const f = ["getAugmentationsFromFaction"];
|
||||
const f = ["singularity", "getAugmentationsFromFaction"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getAugmentationCost()", async function () {
|
||||
const f = ["getAugmentationCost"];
|
||||
const f = ["singularity", "getAugmentationCost"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getAugmentationPrereq()", async function () {
|
||||
const f = ["getAugmentationPrereq"];
|
||||
const f = ["singularity", "getAugmentationPrereq"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getAugmentationPrice()", async function () {
|
||||
const f = ["getAugmentationPrice"];
|
||||
const f = ["singularity", "getAugmentationPrice"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("getAugmentationRepReq()", async function () {
|
||||
const f = ["getAugmentationRepReq"];
|
||||
const f = ["singularity", "getAugmentationRepReq"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("purchaseAugmentation()", async function () {
|
||||
const f = ["purchaseAugmentation"];
|
||||
const f = ["singularity", "purchaseAugmentation"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
|
||||
it("installAugmentations()", async function () {
|
||||
const f = ["installAugmentations"];
|
||||
const f = ["singularity", "installAugmentations"];
|
||||
await testNonzeroDynamicRamCost(f);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -591,13 +591,13 @@ describe("Netscript Static RAM Calculation/Generation Tests", function () {
|
||||
await expectNonZeroRamCost(f);
|
||||
});
|
||||
|
||||
it("stock.buy()", async function () {
|
||||
const f = ["stock", "buy"];
|
||||
it("stock.buyStock()", async function () {
|
||||
const f = ["stock", "buyStock"];
|
||||
await expectNonZeroRamCost(f);
|
||||
});
|
||||
|
||||
it("stock.sell()", async function () {
|
||||
const f = ["stock", "sell"];
|
||||
it("stock.sellStock()", async function () {
|
||||
const f = ["stock", "sellStock"];
|
||||
await expectNonZeroRamCost(f);
|
||||
});
|
||||
|
||||
@@ -607,7 +607,7 @@ describe("Netscript Static RAM Calculation/Generation Tests", function () {
|
||||
});
|
||||
|
||||
it("stock.sellShort()", async function () {
|
||||
const f = ["stock", "sell"];
|
||||
const f = ["stock", "sellShort"];
|
||||
await expectNonZeroRamCost(f);
|
||||
});
|
||||
|
||||
|
||||
@@ -457,13 +457,13 @@ describe("Stock Market Tests", function () {
|
||||
|
||||
it("should trigger a price update when it has enough cycles", function () {
|
||||
// Get the initial prices
|
||||
const initialValues: IMap<Stock> = {};
|
||||
const initialValues: IMap<any> = {};
|
||||
for (const stockName in StockMarket) {
|
||||
const stock = StockMarket[stockName];
|
||||
if (!(stock instanceof Stock)) {
|
||||
continue;
|
||||
}
|
||||
initialValues[stock.symbol] = stock;
|
||||
initialValues[stock.symbol] = { ...stock };
|
||||
}
|
||||
|
||||
// Don't know or care how many exact cycles are required
|
||||
|
||||
Reference in New Issue
Block a user