mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Fixed two getHighestRelativeBotLevel()
tests caused by a refactor of the functions parameters
This commit is contained in:
parent
5ec6bc1aae
commit
5254e9753e
@ -52,10 +52,19 @@ describe("BotLevelGenerator", () =>
|
|||||||
it("should return 10 when player level is 5 and delta is 5", () =>
|
it("should return 10 when player level is 5 and delta is 5", () =>
|
||||||
{
|
{
|
||||||
const levelDetails: MinMax = { min: 5, max: 10 };
|
const levelDetails: MinMax = { min: 5, max: 10 };
|
||||||
|
const botGenDetails: BotGenerationDetails = {
|
||||||
|
isPmc: false,
|
||||||
|
role: "",
|
||||||
|
side: "",
|
||||||
|
botRelativeLevelDeltaMax: 5,
|
||||||
|
botRelativeLevelDeltaMin: 5,
|
||||||
|
playerLevel: 5,
|
||||||
|
botCountToGenerate: 0,
|
||||||
|
botDifficulty: "",
|
||||||
|
isPlayerScav: false
|
||||||
|
};
|
||||||
|
|
||||||
const expTable = databaseServer.getTables().globals.config.exp.level.exp_table;
|
const result = botLevelGenerator.getHighestRelativeBotLevel(botGenDetails, levelDetails, 79);
|
||||||
|
|
||||||
const result = botLevelGenerator.getHighestRelativeBotLevel(5, 5, levelDetails, expTable);
|
|
||||||
|
|
||||||
expect(result).toBe(10);
|
expect(result).toBe(10);
|
||||||
});
|
});
|
||||||
@ -63,16 +72,22 @@ describe("BotLevelGenerator", () =>
|
|||||||
it("should return 79 when player level is above possible max (100), desired max is 100 and delta is 5", () =>
|
it("should return 79 when player level is above possible max (100), desired max is 100 and delta is 5", () =>
|
||||||
{
|
{
|
||||||
const levelDetails: MinMax = { min: 100, max: 100 };
|
const levelDetails: MinMax = { min: 100, max: 100 };
|
||||||
|
const botGenDetails: BotGenerationDetails = {
|
||||||
const expTable = databaseServer.getTables().globals.config.exp.level.exp_table;
|
isPmc: false,
|
||||||
const playerLevel = 100;
|
role: "",
|
||||||
const relativeDeltaMax = 5;
|
side: "",
|
||||||
|
botRelativeLevelDeltaMax: 5,
|
||||||
|
botRelativeLevelDeltaMin: 5,
|
||||||
|
playerLevel: 100,
|
||||||
|
botCountToGenerate: 0,
|
||||||
|
botDifficulty: "",
|
||||||
|
isPlayerScav: false
|
||||||
|
};
|
||||||
|
|
||||||
const result = botLevelGenerator.getHighestRelativeBotLevel(
|
const result = botLevelGenerator.getHighestRelativeBotLevel(
|
||||||
playerLevel,
|
botGenDetails,
|
||||||
relativeDeltaMax,
|
|
||||||
levelDetails,
|
levelDetails,
|
||||||
expTable,
|
79
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(result).toBe(79);
|
expect(result).toBe(79);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user