diff --git a/src/__tests__/default-program.test.ts b/src/__tests__/default-program.test.ts index 5cf4000..fe96b4e 100644 --- a/src/__tests__/default-program.test.ts +++ b/src/__tests__/default-program.test.ts @@ -18,11 +18,11 @@ describe('defaultProgram', () => { expect(w2[0].weight).toBe(200); expect(w2[1].weight).toBe(230); expect(w2[2].weight).toBe(255); - + expect(w3[0].weight).toBe(215); expect(w3[1].weight).toBe(240); expect(w3[2].weight).toBe(270); - + expect(w4[0].weight).toBe(115); expect(w4[1].weight).toBe(145); expect(w4[2].weight).toBe(170); diff --git a/src/__tests__/jim-welder-program.test.ts b/src/__tests__/jim-welder-program.test.ts index 3792e7f..bbd2c4b 100644 --- a/src/__tests__/jim-welder-program.test.ts +++ b/src/__tests__/jim-welder-program.test.ts @@ -8,4 +8,4 @@ describe('JimWendlerProgram', () => { // 100kg expect(JimWendlerProgram(100)[0][0].weight).toBe(60); }); -}); \ No newline at end of file +}); diff --git a/src/__tests__/round-to-five.test.ts b/src/__tests__/round-to-five.test.ts index 0d55290..3d8238b 100644 --- a/src/__tests__/round-to-five.test.ts +++ b/src/__tests__/round-to-five.test.ts @@ -7,4 +7,4 @@ describe('roundToFive', () => { expect(roundToFive(282.3)).toBe(280); expect(roundToFive(164)).toBe(165); }); -}); \ No newline at end of file +}); diff --git a/src/default-program.ts b/src/default-program.ts index 007b004..42c6fd9 100644 --- a/src/default-program.ts +++ b/src/default-program.ts @@ -3,7 +3,7 @@ import { roundToFive } from './round-to-five'; export type ProgramScheme = Array<{ load: number[]; reps: string[]; -}> +}>; export type Program = { weight: number }; export type ProgramSchedule = Program[][]; @@ -18,7 +18,7 @@ export function defaultProgram(maxWeight: number, programScheme: ProgramScheme) return programScheme.map((currentLoad, pp) => { return currentLoad.load.map((loadInPercent, ii) => { - return ({ weight: roundToFive(Math.round(maxWeight * loadInPercent)), reps: programScheme[pp].reps[ii] }); + return { weight: roundToFive(Math.round(maxWeight * loadInPercent)), reps: programScheme[pp].reps[ii] }; }); }); -} \ No newline at end of file +} diff --git a/src/jim-wendler-program.ts b/src/jim-wendler-program.ts index 671ed49..3259e63 100644 --- a/src/jim-wendler-program.ts +++ b/src/jim-wendler-program.ts @@ -11,4 +11,5 @@ const JimWendlerProgramLoad = [week1, week2, week3, week4]; const use90PercentAsDefaultMaxWeight = (maxWeight: number) => roundToFive(Math.round(maxWeight * 0.9)); -export const JimWendlerProgram = (maxWeight: number) => defaultProgram(use90PercentAsDefaultMaxWeight(maxWeight), JimWendlerProgramLoad); \ No newline at end of file +export const JimWendlerProgram = (maxWeight: number) => + defaultProgram(use90PercentAsDefaultMaxWeight(maxWeight), JimWendlerProgramLoad); diff --git a/src/round-to-five.ts b/src/round-to-five.ts index 23c7da8..959781f 100644 --- a/src/round-to-five.ts +++ b/src/round-to-five.ts @@ -1,3 +1,3 @@ export function roundToFive(n: number): number { return Math.round(n / 5) * 5; -} \ No newline at end of file +}