From 827b10f0c4de9dfd1dd2f33002af7bde2094bc86 Mon Sep 17 00:00:00 2001 From: zkldi Date: Wed, 28 Apr 2021 03:23:28 +0100 Subject: [PATCH] pull isApproximately out for future use --- .../core/calculated-data/game-specific-stats.test.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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) => {