mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-09 04:02:40 -05:00
Fix unit tests
This commit is contained in:
parent
7f5b42ecdf
commit
c6eeeb8b60
|
|
@ -1,6 +1,7 @@
|
|||
import { Mode } from "@prisma/client";
|
||||
import { suite } from "uvu";
|
||||
import * as assert from "uvu/assert";
|
||||
import { LFG_AMOUNT_OF_STAGES_TO_GENERATE } from "~/constants";
|
||||
import { idToStage } from "../stages/stages";
|
||||
import { generateMapListForLfgMatch } from "./mapList";
|
||||
|
||||
|
|
@ -15,7 +16,7 @@ GenerateMapListForLfgMatch("Right amount of SZ", () => {
|
|||
if (stageObj.mode === "SZ") amountOfSz++;
|
||||
}
|
||||
|
||||
assert.equal(amountOfSz, 4);
|
||||
assert.equal(amountOfSz, Math.floor(LFG_AMOUNT_OF_STAGES_TO_GENERATE / 2));
|
||||
});
|
||||
|
||||
GenerateMapListForLfgMatch("Contains all modes", () => {
|
||||
|
|
@ -43,7 +44,7 @@ GenerateMapListForLfgMatch("No duplicate maps", () => {
|
|||
maps.add(stageObj.name);
|
||||
}
|
||||
|
||||
assert.equal(maps.size, 9);
|
||||
assert.equal(maps.size, LFG_AMOUNT_OF_STAGES_TO_GENERATE);
|
||||
});
|
||||
|
||||
GenerateMapListForLfgMatch.run();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user