import BigNumber from "bignumber.js";
import { defaultSCurve } from "./math";
import { sCurveExpected } from "./mock.test";
describe("S Curve test", () => {
    it("Calculates bonus by S Curve correctly", () => {
        const expectedSCurve = sCurveExpected.map(e => Number(e));
        const range = [];
        for (let i = 1; i <= 90; i++) {
            range.push(new BigNumber(i, 10));
        }
        const realSCurve = range.map(e => defaultSCurve(e).toNumber());
        const FP_DIGITS = 6;
        for (let i = 0; i < 90; i++) {
            // console.log("Day => ", (i + 1));
            expect(realSCurve[i]).toBeCloseTo(expectedSCurve[i], FP_DIGITS);
        }
    });
});
//# sourceMappingURL=math.test.js.map