diff --git a/server/src/score-import/framework/core/calculated-data/game-specific-stats.test.ts b/server/src/score-import/framework/core/calculated-data/game-specific-stats.test.ts index b9805d457..5601700f6 100644 --- a/server/src/score-import/framework/core/calculated-data/game-specific-stats.test.ts +++ b/server/src/score-import/framework/core/calculated-data/game-specific-stats.test.ts @@ -13,16 +13,7 @@ import { KaidenPercentile, } from "./game-specific-stats"; import CreateLogCtx from "../../../../logger"; - -function isApproximately(number: number, target: number, message: string, lenience = 0.01) { - let result = t.ok(Math.abs(number - target) < lenience, message); - - if (!result) { - throw new Error(`${number} was not close enough to ${target}`); - } - - return true; -} +import { isApproximately } from "../../../../test-utils/asserts"; t.test("#CalculateBPI", (t) => { t.test("AA BPI tests", (t) => {