hevy-shared 1.0.962 → 1.0.963
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -2
- package/built/API/APIClient.d.ts +157 -0
- package/built/API/APIClient.js +381 -0
- package/built/API/index.d.ts +2 -0
- package/built/API/index.js +18 -0
- package/built/API/types.d.ts +38 -0
- package/built/API/types.js +18 -0
- package/built/adjustEventTokens.d.ts +16 -0
- package/built/adjustEventTokens.js +18 -0
- package/built/adminPermissions.d.ts +4 -0
- package/built/adminPermissions.js +22 -0
- package/built/async.d.ts +50 -0
- package/built/async.js +170 -0
- package/built/chat.d.ts +25 -23
- package/built/coachPlans.d.ts +2 -1
- package/built/coachPlans.js +2 -2
- package/built/cue.d.ts +12 -0
- package/built/cue.js +22 -0
- package/built/exerciseLocaleUtils.d.ts +17 -0
- package/built/exerciseLocaleUtils.js +62 -0
- package/built/filterExercises.d.ts +19 -3
- package/built/filterExercises.js +72 -60
- package/built/hevyTrainer.d.ts +250 -0
- package/built/hevyTrainer.js +676 -0
- package/built/index.d.ts +1140 -304
- package/built/index.js +269 -75
- package/built/muscleHeatmaps.d.ts +31 -0
- package/built/muscleHeatmaps.js +68 -0
- package/built/muscleSplits.d.ts +36 -0
- package/built/muscleSplits.js +100 -0
- package/built/normalizedWorkoutUtils.d.ts +88 -0
- package/built/normalizedWorkoutUtils.js +112 -0
- package/built/notifications.d.ts +215 -0
- package/built/notifications.js +9 -0
- package/built/routineUtils.d.ts +14 -0
- package/built/routineUtils.js +186 -0
- package/built/schemas.d.ts +14 -0
- package/built/schemas.js +9 -0
- package/built/setIndicatorUtils.d.ts +4 -3
- package/built/setIndicatorUtils.js +15 -1
- package/built/tests/async.test.d.ts +1 -0
- package/built/tests/async.test.js +49 -0
- package/built/tests/hevyTrainer.test.d.ts +1 -0
- package/built/tests/hevyTrainer.test.js +1199 -0
- package/built/tests/muscleSplit.test.d.ts +1 -0
- package/built/tests/muscleSplit.test.js +153 -0
- package/built/tests/routineUtils.test.d.ts +1 -0
- package/built/tests/routineUtils.test.js +745 -0
- package/built/tests/testUtils.d.ts +85 -0
- package/built/tests/testUtils.js +319 -0
- package/built/tests/utils.test.js +748 -0
- package/built/tests/workoutVolume.test.js +165 -49
- package/built/translations/index.d.ts +2 -0
- package/built/translations/index.js +18 -0
- package/built/translations/translationUtils.d.ts +2 -0
- package/built/translations/translationUtils.js +61 -0
- package/built/translations/types.d.ts +8 -0
- package/built/translations/types.js +20 -0
- package/built/typeUtils.d.ts +70 -0
- package/built/typeUtils.js +55 -0
- package/built/units.d.ts +14 -7
- package/built/units.js +24 -14
- package/built/utils.d.ts +192 -5
- package/built/utils.js +598 -85
- package/built/websocket.d.ts +14 -2
- package/built/workoutVolume.d.ts +24 -5
- package/built/workoutVolume.js +25 -34
- package/package.json +32 -10
- package/.eslintignore +0 -2
- package/.eslintrc +0 -21
- package/.github/workflows/ci.yml +0 -15
- package/.github/workflows/npm-publish.yml +0 -59
- package/.github/workflows/pr-auto-assign.yml +0 -15
- package/.prettierrc.js +0 -5
- package/jest.config.js +0 -4
- package/src/chat.ts +0 -130
- package/src/coachPlans.ts +0 -57
- package/src/constants.ts +0 -14
- package/src/filterExercises.ts +0 -222
- package/src/index.ts +0 -1576
- package/src/setIndicatorUtils.ts +0 -137
- package/src/tests/utils.test.ts +0 -156
- package/src/tests/workoutVolume.test.ts +0 -93
- package/src/units.ts +0 -41
- package/src/utils.ts +0 -516
- package/src/websocket.ts +0 -36
- package/src/workoutVolume.ts +0 -175
- package/tsconfig.json +0 -70
|
@@ -0,0 +1,745 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const routineUtils_1 = require("../routineUtils");
|
|
4
|
+
const testUtils_1 = require("./testUtils");
|
|
5
|
+
describe('majorRoutineUpdate', () => {
|
|
6
|
+
it('takes a routine and a workout, and generates a list of routine exercise updates from the workout', () => {
|
|
7
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
8
|
+
.addExercise((it) => it
|
|
9
|
+
.setProps({
|
|
10
|
+
exerciseTemplateId: 'Warmup',
|
|
11
|
+
exerciseType: 'duration',
|
|
12
|
+
})
|
|
13
|
+
.addDurationSet('normal', 10000))
|
|
14
|
+
.addExercise((it) => it
|
|
15
|
+
.setProps({
|
|
16
|
+
exerciseTemplateId: 'Push ups',
|
|
17
|
+
exerciseType: 'reps_only',
|
|
18
|
+
})
|
|
19
|
+
.addRepsSet('warmup', 5)
|
|
20
|
+
.addRepsSet('normal', 10)
|
|
21
|
+
.addRepsSet('normal', 10)
|
|
22
|
+
.addRepsSet('normal', 5))
|
|
23
|
+
.addExercise((it) => it
|
|
24
|
+
.setProps({
|
|
25
|
+
exerciseTemplateId: 'Pull ups',
|
|
26
|
+
exerciseType: 'reps_only',
|
|
27
|
+
})
|
|
28
|
+
.addRepsSet('warmup', 5)
|
|
29
|
+
.addRepsSet('normal', 10)
|
|
30
|
+
.addRepsSet('normal', null) // no value in routine
|
|
31
|
+
.addRepsSet('normal', null) // no value in routine
|
|
32
|
+
.addRepsSet('normal', null))
|
|
33
|
+
.addExercise((it) => it
|
|
34
|
+
.setProps({
|
|
35
|
+
exerciseTemplateId: 'Running',
|
|
36
|
+
exerciseType: 'distance_duration',
|
|
37
|
+
})
|
|
38
|
+
.addDistanceDurationSet('normal', 3000, 1000))
|
|
39
|
+
.addExercise((it) => it
|
|
40
|
+
.setProps({
|
|
41
|
+
exerciseTemplateId: 'Farmer Walk',
|
|
42
|
+
exerciseType: 'short_distance_weight',
|
|
43
|
+
})
|
|
44
|
+
.addShortDistanceWeightSet('normal', 100, 100)
|
|
45
|
+
.addShortDistanceWeightSet('normal', 200, 200))
|
|
46
|
+
.build();
|
|
47
|
+
/**
|
|
48
|
+
* This workout should generate the following routine updates:
|
|
49
|
+
* - Add a new exercise: Deadlift, after the first exercise
|
|
50
|
+
* - Switch the order of the Pull ups and Push ups exercises
|
|
51
|
+
* - Add a new set to the Push ups exercise, of type 'dropset'
|
|
52
|
+
* - Delete 1 set from the Pull ups exercise
|
|
53
|
+
* - Change the 3rd set type of Push Ups from 'normal' to 'failure'
|
|
54
|
+
* - Update various set values in multiple exercises
|
|
55
|
+
*/
|
|
56
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
57
|
+
.addExercise((it) => it
|
|
58
|
+
.setProps({
|
|
59
|
+
id: 'Warmup',
|
|
60
|
+
})
|
|
61
|
+
.addDurationSet('normal', 15000))
|
|
62
|
+
.addExercise((it) => it
|
|
63
|
+
.setProps({
|
|
64
|
+
id: 'Deadlift',
|
|
65
|
+
})
|
|
66
|
+
.addWeightRepsSet('warmup', 10, 5)
|
|
67
|
+
.addWeightRepsSet('normal', 10, 10)
|
|
68
|
+
.addWeightRepsSet('normal', 10, 10, undefined, false))
|
|
69
|
+
.addExercise((it) => it
|
|
70
|
+
.setProps({
|
|
71
|
+
id: 'Pull ups',
|
|
72
|
+
})
|
|
73
|
+
.addRepsSet('warmup', 5)
|
|
74
|
+
.addRepsSet('normal', 10)
|
|
75
|
+
.addRepsSet('normal', 15)
|
|
76
|
+
.addRepsSet('normal', 0, undefined, false))
|
|
77
|
+
.addExercise((it) => it
|
|
78
|
+
.setProps({
|
|
79
|
+
id: 'Push ups',
|
|
80
|
+
})
|
|
81
|
+
.addRepsSet('warmup', 5)
|
|
82
|
+
.addRepsSet('normal', 10)
|
|
83
|
+
.addRepsSet('failure', 8) // set type and value updated
|
|
84
|
+
.addRepsSet('dropset', 10, undefined, false) // set exists in routine but isn't completed in workout
|
|
85
|
+
.addRepsSet('dropset', 5, undefined, false))
|
|
86
|
+
.addExercise((it) => it
|
|
87
|
+
.setProps({
|
|
88
|
+
id: 'Running',
|
|
89
|
+
})
|
|
90
|
+
.addDistanceDurationSet('normal', 3000, 1000)
|
|
91
|
+
.addDistanceDurationSet('normal', 4000, 4000))
|
|
92
|
+
.addExercise((it) => it
|
|
93
|
+
.setProps({
|
|
94
|
+
id: 'Farmer Walk',
|
|
95
|
+
})
|
|
96
|
+
.addShortDistanceWeightSet('normal', 300, 300)
|
|
97
|
+
.addShortDistanceWeightSet('normal', 400, 400))
|
|
98
|
+
.build();
|
|
99
|
+
const routineUpdate = (0, routineUtils_1.majorRoutineUpdate)(routine, workout);
|
|
100
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
101
|
+
.addExercise((it) => it
|
|
102
|
+
.setProps({
|
|
103
|
+
exerciseTemplateId: 'Warmup',
|
|
104
|
+
})
|
|
105
|
+
.addDurationSet('normal', 15000))
|
|
106
|
+
.addExercise((it) => it
|
|
107
|
+
.setProps({
|
|
108
|
+
exerciseTemplateId: 'Deadlift',
|
|
109
|
+
inputModifier: undefined,
|
|
110
|
+
})
|
|
111
|
+
.addWeightRepsSet('warmup', 10, 5)
|
|
112
|
+
.addWeightRepsSet('normal', 10, 10)
|
|
113
|
+
.addWeightRepsSet('normal', 10, 10))
|
|
114
|
+
.addExercise((it) => it
|
|
115
|
+
.setProps({
|
|
116
|
+
exerciseTemplateId: 'Pull ups',
|
|
117
|
+
inputModifier: undefined,
|
|
118
|
+
})
|
|
119
|
+
.addRepsSet('warmup', 5)
|
|
120
|
+
.addRepsSet('normal', 10)
|
|
121
|
+
.addRepsSet('normal', 15)
|
|
122
|
+
.addRepsSet('normal', null))
|
|
123
|
+
.addExercise((it) => it
|
|
124
|
+
.setProps({
|
|
125
|
+
exerciseTemplateId: 'Push ups',
|
|
126
|
+
inputModifier: undefined,
|
|
127
|
+
})
|
|
128
|
+
.addRepsSet('warmup', 5)
|
|
129
|
+
.addRepsSet('normal', 10)
|
|
130
|
+
.addRepsSet('failure', 8)
|
|
131
|
+
.addRepsSet('dropset', 10) // the set wasn't completed in the workout, but we should still update it
|
|
132
|
+
.addRepsSet('dropset', 5))
|
|
133
|
+
.addExercise((it) => it
|
|
134
|
+
.setProps({
|
|
135
|
+
exerciseTemplateId: 'Running',
|
|
136
|
+
inputModifier: undefined,
|
|
137
|
+
})
|
|
138
|
+
.addDistanceDurationSet('normal', 3000, 1000)
|
|
139
|
+
.addDistanceDurationSet('normal', 4000, 4000))
|
|
140
|
+
.addExercise((it) => it
|
|
141
|
+
.setProps({
|
|
142
|
+
exerciseTemplateId: 'Farmer Walk',
|
|
143
|
+
inputModifier: undefined,
|
|
144
|
+
})
|
|
145
|
+
.addShortDistanceWeightSet('normal', 300, 300)
|
|
146
|
+
.addShortDistanceWeightSet('normal', 400, 400))
|
|
147
|
+
.build();
|
|
148
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
149
|
+
});
|
|
150
|
+
it('adds the reps value to the start of the rep range if the rep range is empty (null - null)', () => {
|
|
151
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
152
|
+
.addExercise((it) => it
|
|
153
|
+
.setProps({
|
|
154
|
+
exerciseTemplateId: 'Push ups',
|
|
155
|
+
exerciseType: 'reps_only',
|
|
156
|
+
inputModifier: 'rep-range',
|
|
157
|
+
})
|
|
158
|
+
.addRepRangeSet('normal', { start: null, end: 5 })
|
|
159
|
+
.addRepRangeSet('normal', { start: null, end: null }))
|
|
160
|
+
.build();
|
|
161
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
162
|
+
.addExercise((it) => it
|
|
163
|
+
.setProps({
|
|
164
|
+
id: 'Push ups',
|
|
165
|
+
})
|
|
166
|
+
.addRepsSet('normal', 1)
|
|
167
|
+
.addRepsSet('normal', 2)
|
|
168
|
+
.addRepsSet('normal', 3))
|
|
169
|
+
.build();
|
|
170
|
+
const routineUpdate = (0, routineUtils_1.majorRoutineUpdate)(routine, workout);
|
|
171
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
172
|
+
.addExercise((it) => it
|
|
173
|
+
.setProps({
|
|
174
|
+
exerciseTemplateId: 'Push ups',
|
|
175
|
+
inputModifier: 'rep-range',
|
|
176
|
+
})
|
|
177
|
+
.addRepRangeSet('normal', { start: null, end: 5 })
|
|
178
|
+
.addRepRangeSet('normal', { start: 2, end: null })
|
|
179
|
+
.addRepRangeSet('normal', { start: 3, end: null }))
|
|
180
|
+
.build();
|
|
181
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
182
|
+
});
|
|
183
|
+
it('Preserves rep ranges correctly', () => {
|
|
184
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
185
|
+
.addExercise((it) => it
|
|
186
|
+
.setProps({
|
|
187
|
+
exerciseTemplateId: 'Bench Press',
|
|
188
|
+
exerciseType: 'weight_reps',
|
|
189
|
+
inputModifier: 'rep-range',
|
|
190
|
+
})
|
|
191
|
+
.addWeightRepRangeSet('normal', 71, { start: 8, end: 12 })
|
|
192
|
+
.addWeightRepRangeSet('normal', 72, { start: null, end: null })
|
|
193
|
+
.addWeightRepRangeSet('normal', 73, { start: 8, end: null })
|
|
194
|
+
.addWeightRepRangeSet('normal', 74, { start: null, end: 12 }))
|
|
195
|
+
.build();
|
|
196
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
197
|
+
.addExercise((it) => it
|
|
198
|
+
.setProps({
|
|
199
|
+
id: 'Bench Press',
|
|
200
|
+
})
|
|
201
|
+
.addWeightRepsSet('normal', 61, 10)
|
|
202
|
+
.addWeightRepsSet('normal', 62, 10)
|
|
203
|
+
.addWeightRepsSet('normal', 63, 10)
|
|
204
|
+
.addWeightRepsSet('normal', 64, 10)
|
|
205
|
+
.addWeightRepsSet('normal', 65, 10))
|
|
206
|
+
.build();
|
|
207
|
+
const routineUpdate = (0, routineUtils_1.majorRoutineUpdate)(routine, workout);
|
|
208
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
209
|
+
.addExercise((it) => it
|
|
210
|
+
.setProps({
|
|
211
|
+
exerciseTemplateId: 'Bench Press',
|
|
212
|
+
inputModifier: 'rep-range',
|
|
213
|
+
})
|
|
214
|
+
.addWeightRepRangeSet('normal', 61, { start: 8, end: 12 })
|
|
215
|
+
.addWeightRepRangeSet('normal', 62, { start: 10, end: null })
|
|
216
|
+
.addWeightRepRangeSet('normal', 63, { start: 8, end: null })
|
|
217
|
+
.addWeightRepRangeSet('normal', 64, { start: null, end: 12 })
|
|
218
|
+
.addWeightRepRangeSet('normal', 65, { start: 10, end: null }))
|
|
219
|
+
.build();
|
|
220
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
221
|
+
});
|
|
222
|
+
it('Handles target rpe correctly', () => {
|
|
223
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
224
|
+
.addExercise((it) => it
|
|
225
|
+
.setProps({
|
|
226
|
+
exerciseTemplateId: 'Push ups',
|
|
227
|
+
exerciseType: 'reps_only',
|
|
228
|
+
})
|
|
229
|
+
.addRepsSet('warmup', 6) // 6 reps, NO RPE
|
|
230
|
+
.addRepsSet('normal', 7, 9) // 7 reps, 9 RPE
|
|
231
|
+
.addRepsSet('normal', 8, 10))
|
|
232
|
+
.build();
|
|
233
|
+
// Add a new set to the workout, and logged the RPEs
|
|
234
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
235
|
+
.addExercise((it) => it
|
|
236
|
+
.setProps({
|
|
237
|
+
id: 'Push ups',
|
|
238
|
+
})
|
|
239
|
+
.addRepsSet('warmup', 1, 7) // 1 rep, 7 RPE
|
|
240
|
+
.addRepsSet('normal', 2) // 2 reps, NO RPE
|
|
241
|
+
.addRepsSet('dropset', 3, 8) // 3 reps, 8 RPE
|
|
242
|
+
.addRepsSet('failure', 4, 8.5))
|
|
243
|
+
.build();
|
|
244
|
+
const routineUpdate = (0, routineUtils_1.majorRoutineUpdate)(routine, workout);
|
|
245
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
246
|
+
.addExercise((it) => it
|
|
247
|
+
.setProps({
|
|
248
|
+
exerciseTemplateId: 'Push ups',
|
|
249
|
+
})
|
|
250
|
+
.addRepsSet('warmup', 1) // Logged RPE is not included in the routine update
|
|
251
|
+
.addRepsSet('normal', 2, 9)
|
|
252
|
+
.addRepsSet('dropset', 3, 10)
|
|
253
|
+
.addRepsSet('failure', 4))
|
|
254
|
+
.build();
|
|
255
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
256
|
+
});
|
|
257
|
+
it('Handles rpe, rep range and weight correctly at the same time', () => {
|
|
258
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
259
|
+
.addExercise((it) => it
|
|
260
|
+
.setProps({
|
|
261
|
+
exerciseTemplateId: 'Bench Press',
|
|
262
|
+
exerciseType: 'weight_reps',
|
|
263
|
+
inputModifier: 'rep-range',
|
|
264
|
+
})
|
|
265
|
+
.addWeightRepRangeSet('normal', 100, { start: 3, end: 5 }, 7) // 100kg, 3-5 reps, @7 RPE
|
|
266
|
+
.addWeightRepRangeSet('normal', 100, { start: 3, end: 5 })
|
|
267
|
+
.addWeightRepRangeSet('normal', 100, { start: null, end: 5 }, 7)
|
|
268
|
+
.addWeightRepRangeSet('normal', 100, { start: 3, end: null }, 7)
|
|
269
|
+
.addWeightRepRangeSet('normal', 100, { start: null, end: null }, 7)
|
|
270
|
+
.addWeightRepRangeSet('normal', 100, { start: null, end: null })
|
|
271
|
+
.addWeightRepRangeSet('normal', 100, { start: 5, end: 6 }, 7))
|
|
272
|
+
.build();
|
|
273
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
274
|
+
.addExercise((it) => it
|
|
275
|
+
.setProps({
|
|
276
|
+
id: 'Bench Press',
|
|
277
|
+
})
|
|
278
|
+
.addWeightRepsSet('normal', 100, 2, 10)
|
|
279
|
+
.addWeightRepsSet('normal', 97, 3, 9)
|
|
280
|
+
.addWeightRepsSet('normal', 95, 2, 8)
|
|
281
|
+
.addWeightRepsSet('normal', 100, 4, 7)
|
|
282
|
+
.addWeightRepsSet('normal', 100, 5, 6)
|
|
283
|
+
.addWeightRepsSet('normal', 100, 6, 7.5))
|
|
284
|
+
.build();
|
|
285
|
+
const routineUpdate = (0, routineUtils_1.majorRoutineUpdate)(routine, workout);
|
|
286
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
287
|
+
.addExercise((it) => it
|
|
288
|
+
.setProps({
|
|
289
|
+
exerciseTemplateId: 'Bench Press',
|
|
290
|
+
inputModifier: 'rep-range',
|
|
291
|
+
})
|
|
292
|
+
.addWeightRepRangeSet('normal', 100, { start: 3, end: 5 }, 7) // 100kg, 3-5 reps, @7 RPE
|
|
293
|
+
.addWeightRepRangeSet('normal', 97, { start: 3, end: 5 })
|
|
294
|
+
.addWeightRepRangeSet('normal', 95, { start: null, end: 5 }, 7)
|
|
295
|
+
.addWeightRepRangeSet('normal', 100, { start: 3, end: null }, 7)
|
|
296
|
+
.addWeightRepRangeSet('normal', 100, { start: 5, end: null }, 7)
|
|
297
|
+
.addWeightRepRangeSet('normal', 100, { start: 6, end: null }))
|
|
298
|
+
.build();
|
|
299
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
describe('minorRoutineUpdate', () => {
|
|
303
|
+
it('Calculates routine exercise set values to update after a workout', () => {
|
|
304
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
305
|
+
.addExercise((it) => it
|
|
306
|
+
.setProps({
|
|
307
|
+
exerciseTemplateId: 'a',
|
|
308
|
+
exerciseType: 'weight_reps',
|
|
309
|
+
supersetId: null,
|
|
310
|
+
restSeconds: 5,
|
|
311
|
+
})
|
|
312
|
+
.addWeightRepsSet('warmup', 10, 10)
|
|
313
|
+
.addWeightRepsSet('normal', 15, 10)
|
|
314
|
+
.addWeightRepsSet('dropset', 20, 10)
|
|
315
|
+
.addWeightRepsSet('failure', 25, 10))
|
|
316
|
+
.addExercise((it) => it
|
|
317
|
+
.setProps({
|
|
318
|
+
exerciseTemplateId: 'b',
|
|
319
|
+
exerciseType: 'weight_reps',
|
|
320
|
+
supersetId: 0,
|
|
321
|
+
restSeconds: 10,
|
|
322
|
+
})
|
|
323
|
+
.addWeightRepsSet('warmup', 20, 10)
|
|
324
|
+
.addWeightRepsSet('normal', 25, 10)
|
|
325
|
+
.addWeightRepsSet('normal', 30, 10)
|
|
326
|
+
.addWeightRepsSet('normal', 35, 10))
|
|
327
|
+
.addExercise((it) => it
|
|
328
|
+
.setProps({
|
|
329
|
+
exerciseTemplateId: 'c',
|
|
330
|
+
exerciseType: 'weight_reps',
|
|
331
|
+
supersetId: 0,
|
|
332
|
+
restSeconds: 15,
|
|
333
|
+
})
|
|
334
|
+
.addWeightRepsSet('warmup', 30, 10)
|
|
335
|
+
.addWeightRepsSet('normal', 35, 10)
|
|
336
|
+
.addWeightRepsSet('normal', 40, 10)
|
|
337
|
+
.addWeightRepsSet('normal', 45, 10))
|
|
338
|
+
.build();
|
|
339
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
340
|
+
.addExercise((it) => it
|
|
341
|
+
.setProps({
|
|
342
|
+
id: 'a',
|
|
343
|
+
supersetId: 0,
|
|
344
|
+
autoRestTimerSeconds: 1,
|
|
345
|
+
})
|
|
346
|
+
.addWeightRepsSet('warmup', 1, 2)
|
|
347
|
+
.addWeightRepsSet('normal', 3, 4)
|
|
348
|
+
.addWeightRepsSet('dropset', 5, 6)
|
|
349
|
+
.addWeightRepsSet('failure', 7, 8))
|
|
350
|
+
.addExercise((it) => it
|
|
351
|
+
.setProps({
|
|
352
|
+
id: 'b',
|
|
353
|
+
supersetId: 0,
|
|
354
|
+
autoRestTimerSeconds: undefined,
|
|
355
|
+
})
|
|
356
|
+
.addWeightRepsSet('warmup', 9, 10)
|
|
357
|
+
.addWeightRepsSet('failure', 11, 12)
|
|
358
|
+
.addWeightRepsSet('dropset', 13, 14)
|
|
359
|
+
.addWeightRepsSet('normal', 15, 16))
|
|
360
|
+
.addExercise((it) => it
|
|
361
|
+
.setProps({
|
|
362
|
+
id: 'c',
|
|
363
|
+
supersetId: undefined,
|
|
364
|
+
autoRestTimerSeconds: 2,
|
|
365
|
+
})
|
|
366
|
+
.addWeightRepsSet('warmup', 17, 18)
|
|
367
|
+
.addWeightRepsSet('normal', 19, 20)
|
|
368
|
+
.addWeightRepsSet('normal', 21, 22)
|
|
369
|
+
.addWeightRepsSet('normal', 23, 24))
|
|
370
|
+
.addExercise((it) => it
|
|
371
|
+
.setProps({
|
|
372
|
+
id: 'd',
|
|
373
|
+
supersetId: undefined,
|
|
374
|
+
autoRestTimerSeconds: undefined,
|
|
375
|
+
})
|
|
376
|
+
.addWeightRepsSet('warmup', 25, 26)
|
|
377
|
+
.addWeightRepsSet('normal', 27, 28)
|
|
378
|
+
.addWeightRepsSet('normal', 29, 30)
|
|
379
|
+
.addWeightRepsSet('normal', 31, 32))
|
|
380
|
+
.build();
|
|
381
|
+
const routineUpdate = (0, routineUtils_1.minorRoutineUpdate)(routine, workout);
|
|
382
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
383
|
+
.addExercise((it) => it
|
|
384
|
+
.setProps({
|
|
385
|
+
exerciseTemplateId: 'a',
|
|
386
|
+
supersetId: 0,
|
|
387
|
+
restSeconds: 1,
|
|
388
|
+
})
|
|
389
|
+
.addWeightRepsSet('warmup', 1, 2)
|
|
390
|
+
.addWeightRepsSet('normal', 3, 4)
|
|
391
|
+
.addWeightRepsSet('dropset', 5, 6)
|
|
392
|
+
.addWeightRepsSet('failure', 7, 8))
|
|
393
|
+
.addExercise((it) => it
|
|
394
|
+
.setProps({
|
|
395
|
+
exerciseTemplateId: 'b',
|
|
396
|
+
supersetId: 0,
|
|
397
|
+
restSeconds: undefined,
|
|
398
|
+
})
|
|
399
|
+
.addWeightRepsSet('warmup', 9, 10)
|
|
400
|
+
.addWeightRepsSet('normal', 11, 12)
|
|
401
|
+
.addWeightRepsSet('normal', 15, 16)
|
|
402
|
+
.addWeightRepsSet('normal', 35, 10))
|
|
403
|
+
.addExercise((it) => it
|
|
404
|
+
.setProps({
|
|
405
|
+
exerciseTemplateId: 'c',
|
|
406
|
+
supersetId: undefined,
|
|
407
|
+
restSeconds: 2,
|
|
408
|
+
})
|
|
409
|
+
.addWeightRepsSet('warmup', 17, 18)
|
|
410
|
+
.addWeightRepsSet('normal', 19, 20)
|
|
411
|
+
.addWeightRepsSet('normal', 21, 22)
|
|
412
|
+
.addWeightRepsSet('normal', 23, 24))
|
|
413
|
+
.build();
|
|
414
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
415
|
+
});
|
|
416
|
+
it('Handles reordering exercises in the workout', () => {
|
|
417
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
418
|
+
.addExercise((it) => it
|
|
419
|
+
.setProps({
|
|
420
|
+
exerciseTemplateId: 'a',
|
|
421
|
+
exerciseType: 'weight_reps',
|
|
422
|
+
})
|
|
423
|
+
.addWeightRepsSet('warmup')
|
|
424
|
+
.addWeightRepsSet('normal')
|
|
425
|
+
.addWeightRepsSet('normal')
|
|
426
|
+
.addWeightRepsSet('normal'))
|
|
427
|
+
.addExercise((it) => it
|
|
428
|
+
.setProps({
|
|
429
|
+
exerciseTemplateId: 'b',
|
|
430
|
+
exerciseType: 'weight_reps',
|
|
431
|
+
})
|
|
432
|
+
.addWeightRepsSet('warmup')
|
|
433
|
+
.addWeightRepsSet('normal')
|
|
434
|
+
.addWeightRepsSet('normal')
|
|
435
|
+
.addWeightRepsSet('normal'))
|
|
436
|
+
.addExercise((it) => it
|
|
437
|
+
.setProps({
|
|
438
|
+
exerciseTemplateId: 'c',
|
|
439
|
+
exerciseType: 'weight_reps',
|
|
440
|
+
})
|
|
441
|
+
.addWeightRepsSet('warmup')
|
|
442
|
+
.addWeightRepsSet('normal')
|
|
443
|
+
.addWeightRepsSet('normal')
|
|
444
|
+
.addWeightRepsSet('normal'))
|
|
445
|
+
.build();
|
|
446
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
447
|
+
.addExercise((it) => it
|
|
448
|
+
.setProps({
|
|
449
|
+
id: 'b',
|
|
450
|
+
supersetId: 0,
|
|
451
|
+
autoRestTimerSeconds: 2,
|
|
452
|
+
})
|
|
453
|
+
.addWeightRepsSet('warmup', 9, 10)
|
|
454
|
+
.addWeightRepsSet('normal', 11, 12)
|
|
455
|
+
.addWeightRepsSet('normal', 13, 14)
|
|
456
|
+
.addWeightRepsSet('normal', 15, 16))
|
|
457
|
+
.addExercise((it) => it
|
|
458
|
+
.setProps({
|
|
459
|
+
id: 'c',
|
|
460
|
+
supersetId: undefined,
|
|
461
|
+
autoRestTimerSeconds: 3,
|
|
462
|
+
})
|
|
463
|
+
.addWeightRepsSet('warmup', 17, 18)
|
|
464
|
+
.addWeightRepsSet('normal', 19, 20)
|
|
465
|
+
.addWeightRepsSet('normal', 21, 22)
|
|
466
|
+
.addWeightRepsSet('normal', 23, 24))
|
|
467
|
+
.addExercise((it) => it
|
|
468
|
+
.setProps({
|
|
469
|
+
id: 'a',
|
|
470
|
+
supersetId: 0,
|
|
471
|
+
autoRestTimerSeconds: 1,
|
|
472
|
+
})
|
|
473
|
+
.addWeightRepsSet('warmup', 1, 2)
|
|
474
|
+
.addWeightRepsSet('normal', 3, 4)
|
|
475
|
+
.addWeightRepsSet('normal', 5, 6)
|
|
476
|
+
.addWeightRepsSet('normal', 7, 8))
|
|
477
|
+
.addExercise((it) => it
|
|
478
|
+
.setProps({
|
|
479
|
+
id: 'd',
|
|
480
|
+
supersetId: undefined,
|
|
481
|
+
autoRestTimerSeconds: undefined,
|
|
482
|
+
})
|
|
483
|
+
.addWeightRepsSet('warmup', 25, 26)
|
|
484
|
+
.addWeightRepsSet('normal', 27, 28)
|
|
485
|
+
.addWeightRepsSet('normal', 29, 29)
|
|
486
|
+
.addWeightRepsSet('normal', 31, 32))
|
|
487
|
+
.build();
|
|
488
|
+
const routineUpdate = (0, routineUtils_1.minorRoutineUpdate)(routine, workout);
|
|
489
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
490
|
+
.addExercise((it) => it
|
|
491
|
+
.setProps({
|
|
492
|
+
exerciseTemplateId: 'a',
|
|
493
|
+
supersetId: 0,
|
|
494
|
+
restSeconds: 1,
|
|
495
|
+
})
|
|
496
|
+
.addWeightRepsSet('warmup', 1, 2)
|
|
497
|
+
.addWeightRepsSet('normal', 3, 4)
|
|
498
|
+
.addWeightRepsSet('normal', 5, 6)
|
|
499
|
+
.addWeightRepsSet('normal', 7, 8))
|
|
500
|
+
.addExercise((it) => it
|
|
501
|
+
.setProps({
|
|
502
|
+
exerciseTemplateId: 'b',
|
|
503
|
+
supersetId: 0,
|
|
504
|
+
restSeconds: 2,
|
|
505
|
+
})
|
|
506
|
+
.addWeightRepsSet('warmup', 9, 10)
|
|
507
|
+
.addWeightRepsSet('normal', 11, 12)
|
|
508
|
+
.addWeightRepsSet('normal', 13, 14)
|
|
509
|
+
.addWeightRepsSet('normal', 15, 16))
|
|
510
|
+
.addExercise((it) => it
|
|
511
|
+
.setProps({
|
|
512
|
+
exerciseTemplateId: 'c',
|
|
513
|
+
supersetId: undefined,
|
|
514
|
+
restSeconds: 3,
|
|
515
|
+
})
|
|
516
|
+
.addWeightRepsSet('warmup', 17, 18)
|
|
517
|
+
.addWeightRepsSet('normal', 19, 20)
|
|
518
|
+
.addWeightRepsSet('normal', 21, 22)
|
|
519
|
+
.addWeightRepsSet('normal', 23, 24))
|
|
520
|
+
.build();
|
|
521
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
522
|
+
});
|
|
523
|
+
it('Handles multiple occurrences of the same exercise', () => {
|
|
524
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
525
|
+
.addExercise((it) => it
|
|
526
|
+
.setProps({
|
|
527
|
+
exerciseTemplateId: 'a',
|
|
528
|
+
exerciseType: 'weight_reps',
|
|
529
|
+
})
|
|
530
|
+
.addWeightRepsSet('warmup')
|
|
531
|
+
.addWeightRepsSet('normal')
|
|
532
|
+
.addWeightRepsSet('normal')
|
|
533
|
+
.addWeightRepsSet('normal'))
|
|
534
|
+
.addExercise((it) => it
|
|
535
|
+
.setProps({
|
|
536
|
+
exerciseTemplateId: 'b',
|
|
537
|
+
exerciseType: 'weight_reps',
|
|
538
|
+
})
|
|
539
|
+
.addWeightRepsSet('warmup')
|
|
540
|
+
.addWeightRepsSet('normal')
|
|
541
|
+
.addWeightRepsSet('normal')
|
|
542
|
+
.addWeightRepsSet('normal'))
|
|
543
|
+
.addExercise((it) => it
|
|
544
|
+
.setProps({
|
|
545
|
+
exerciseTemplateId: 'a',
|
|
546
|
+
exerciseType: 'weight_reps',
|
|
547
|
+
})
|
|
548
|
+
.addWeightRepsSet('warmup')
|
|
549
|
+
.addWeightRepsSet('normal')
|
|
550
|
+
.addWeightRepsSet('normal')
|
|
551
|
+
.addWeightRepsSet('normal'))
|
|
552
|
+
.build();
|
|
553
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
554
|
+
.addExercise((it) => it
|
|
555
|
+
.setProps({
|
|
556
|
+
id: 'b',
|
|
557
|
+
supersetId: 0,
|
|
558
|
+
autoRestTimerSeconds: 2,
|
|
559
|
+
})
|
|
560
|
+
.addWeightRepsSet('warmup', 9, 10)
|
|
561
|
+
.addWeightRepsSet('normal', 11, 12)
|
|
562
|
+
.addWeightRepsSet('normal', 13, 14)
|
|
563
|
+
.addWeightRepsSet('normal', 15, 16))
|
|
564
|
+
.addExercise((it) => it
|
|
565
|
+
.setProps({
|
|
566
|
+
id: 'a',
|
|
567
|
+
supersetId: undefined,
|
|
568
|
+
autoRestTimerSeconds: 3,
|
|
569
|
+
})
|
|
570
|
+
.addWeightRepsSet('warmup', 1, 2)
|
|
571
|
+
.addWeightRepsSet('normal', 3, 4)
|
|
572
|
+
.addWeightRepsSet('normal', 5, 6)
|
|
573
|
+
.addWeightRepsSet('normal', 7, 8))
|
|
574
|
+
.addExercise((it) => it
|
|
575
|
+
.setProps({
|
|
576
|
+
id: 'a',
|
|
577
|
+
supersetId: 0,
|
|
578
|
+
autoRestTimerSeconds: 1,
|
|
579
|
+
})
|
|
580
|
+
.addWeightRepsSet('warmup', 17, 18)
|
|
581
|
+
.addWeightRepsSet('normal', 19, 20)
|
|
582
|
+
.addWeightRepsSet('normal', 21, 22)
|
|
583
|
+
.addWeightRepsSet('normal', 23, 24))
|
|
584
|
+
.addExercise((it) => it
|
|
585
|
+
.setProps({
|
|
586
|
+
id: 'd',
|
|
587
|
+
supersetId: undefined,
|
|
588
|
+
autoRestTimerSeconds: undefined,
|
|
589
|
+
})
|
|
590
|
+
.addWeightRepsSet('warmup', 25, 26)
|
|
591
|
+
.addWeightRepsSet('normal', 27, 28)
|
|
592
|
+
.addWeightRepsSet('normal', 29, 29)
|
|
593
|
+
.addWeightRepsSet('normal', 31, 32))
|
|
594
|
+
.build();
|
|
595
|
+
const routineUpdate = (0, routineUtils_1.minorRoutineUpdate)(routine, workout);
|
|
596
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
597
|
+
.addExercise((it) => it
|
|
598
|
+
.setProps({
|
|
599
|
+
exerciseTemplateId: 'a',
|
|
600
|
+
supersetId: undefined,
|
|
601
|
+
restSeconds: 3,
|
|
602
|
+
})
|
|
603
|
+
.addWeightRepsSet('warmup', 1, 2)
|
|
604
|
+
.addWeightRepsSet('normal', 3, 4)
|
|
605
|
+
.addWeightRepsSet('normal', 5, 6)
|
|
606
|
+
.addWeightRepsSet('normal', 7, 8))
|
|
607
|
+
.addExercise((it) => it
|
|
608
|
+
.setProps({
|
|
609
|
+
exerciseTemplateId: 'b',
|
|
610
|
+
supersetId: 0,
|
|
611
|
+
restSeconds: 2,
|
|
612
|
+
})
|
|
613
|
+
.addWeightRepsSet('warmup', 9, 10)
|
|
614
|
+
.addWeightRepsSet('normal', 11, 12)
|
|
615
|
+
.addWeightRepsSet('normal', 13, 14)
|
|
616
|
+
.addWeightRepsSet('normal', 15, 16))
|
|
617
|
+
.addExercise((it) => it
|
|
618
|
+
.setProps({
|
|
619
|
+
exerciseTemplateId: 'a',
|
|
620
|
+
supersetId: 0,
|
|
621
|
+
restSeconds: 1,
|
|
622
|
+
})
|
|
623
|
+
.addWeightRepsSet('warmup', 17, 18)
|
|
624
|
+
.addWeightRepsSet('normal', 19, 20)
|
|
625
|
+
.addWeightRepsSet('normal', 21, 22)
|
|
626
|
+
.addWeightRepsSet('normal', 23, 24))
|
|
627
|
+
.build();
|
|
628
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
629
|
+
});
|
|
630
|
+
it('Handles rep ranges correctly', () => {
|
|
631
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
632
|
+
.addExercise((it) => it
|
|
633
|
+
.setProps({
|
|
634
|
+
exerciseTemplateId: 'Push ups',
|
|
635
|
+
exerciseType: 'reps_only',
|
|
636
|
+
inputModifier: 'rep-range',
|
|
637
|
+
})
|
|
638
|
+
.addRepRangeSet('normal', { start: null, end: 5 })
|
|
639
|
+
.addRepRangeSet('normal', { start: null, end: null }) // blank to blank rep range
|
|
640
|
+
.addRepRangeSet('normal', { start: 2, end: 2 })
|
|
641
|
+
.addRepRangeSet('normal', { start: 3, end: 2 })
|
|
642
|
+
.addRepRangeSet('normal', { start: null, end: 2 }))
|
|
643
|
+
.build();
|
|
644
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
645
|
+
.addExercise((it) => it
|
|
646
|
+
.setProps({
|
|
647
|
+
id: 'Push ups',
|
|
648
|
+
})
|
|
649
|
+
.addRepsSet('normal', 1)
|
|
650
|
+
.addRepsSet('normal', 2)
|
|
651
|
+
.addRepsSet('normal', 3))
|
|
652
|
+
.build();
|
|
653
|
+
const routineUpdate = (0, routineUtils_1.minorRoutineUpdate)(routine, workout);
|
|
654
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
655
|
+
.addExercise((it) => it
|
|
656
|
+
.setProps({
|
|
657
|
+
exerciseTemplateId: 'Push ups',
|
|
658
|
+
inputModifier: 'rep-range',
|
|
659
|
+
})
|
|
660
|
+
.addRepRangeSet('normal', { start: null, end: 5 })
|
|
661
|
+
.addRepRangeSet('normal', { start: 2, end: null }) // add logged reps to the start of the rep range, if rep range is blank to blank
|
|
662
|
+
.addRepRangeSet('normal', { start: 2, end: 2 })
|
|
663
|
+
.addRepRangeSet('normal', { start: 3, end: 2 })
|
|
664
|
+
.addRepRangeSet('normal', { start: null, end: 2 }))
|
|
665
|
+
.build();
|
|
666
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
667
|
+
});
|
|
668
|
+
it('Handles target rpe correctly', () => {
|
|
669
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
670
|
+
.addExercise((it) => it
|
|
671
|
+
.setProps({
|
|
672
|
+
exerciseTemplateId: 'Push ups',
|
|
673
|
+
exerciseType: 'reps_only',
|
|
674
|
+
})
|
|
675
|
+
.addRepsSet('normal', 6) // 6 reps, NO RPE
|
|
676
|
+
.addRepsSet('normal', 7, 9) // 7 reps, 9 RPE
|
|
677
|
+
.addRepsSet('normal', 8, 10))
|
|
678
|
+
.build();
|
|
679
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
680
|
+
.addExercise((it) => it
|
|
681
|
+
.setProps({
|
|
682
|
+
id: 'Push ups',
|
|
683
|
+
})
|
|
684
|
+
.addRepsSet('normal', 1, 7) // 1 rep, 7 RPE
|
|
685
|
+
.addRepsSet('normal', 2) // 2 reps, NO RPE
|
|
686
|
+
.addRepsSet('normal', 3, 8) // 3 reps, 8 RPE
|
|
687
|
+
.addRepsSet('normal', 4, 8.5))
|
|
688
|
+
.build();
|
|
689
|
+
const routineUpdate = (0, routineUtils_1.minorRoutineUpdate)(routine, workout);
|
|
690
|
+
// Logged RPE is not included in the routine update and preserved the target RPE
|
|
691
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
692
|
+
.addExercise((it) => it
|
|
693
|
+
.setProps({
|
|
694
|
+
exerciseTemplateId: 'Push ups',
|
|
695
|
+
})
|
|
696
|
+
.addRepsSet('normal', 1)
|
|
697
|
+
.addRepsSet('normal', 2, 9)
|
|
698
|
+
.addRepsSet('normal', 3, 10))
|
|
699
|
+
.build();
|
|
700
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
701
|
+
});
|
|
702
|
+
it('Handles rpe, rep range and weight correctly at the same time', () => {
|
|
703
|
+
const routine = new testUtils_1.RoutineBuilder()
|
|
704
|
+
.addExercise((it) => it
|
|
705
|
+
.setProps({
|
|
706
|
+
exerciseTemplateId: 'Bench Press',
|
|
707
|
+
exerciseType: 'weight_reps',
|
|
708
|
+
inputModifier: 'rep-range',
|
|
709
|
+
})
|
|
710
|
+
.addWeightRepRangeSet('normal', 100, { start: 3, end: 5 }, 7) // 100kg, 3-5 reps, @7 RPE
|
|
711
|
+
.addWeightRepRangeSet('normal', 100, { start: 3, end: 5 })
|
|
712
|
+
.addWeightRepRangeSet('normal', 100, { start: null, end: 5 }, 7)
|
|
713
|
+
.addWeightRepRangeSet('normal', 100, { start: 3, end: null }, 7)
|
|
714
|
+
.addWeightRepRangeSet('normal', 100, { start: null, end: null }, 7)
|
|
715
|
+
.addWeightRepRangeSet('normal', 100, { start: null, end: null }))
|
|
716
|
+
.build();
|
|
717
|
+
const workout = new testUtils_1.WorkoutBuilder()
|
|
718
|
+
.addExercise((it) => it
|
|
719
|
+
.setProps({
|
|
720
|
+
id: 'Bench Press',
|
|
721
|
+
})
|
|
722
|
+
.addWeightRepsSet('normal', 100, 2, 10)
|
|
723
|
+
.addWeightRepsSet('normal', 97, 3, 9)
|
|
724
|
+
.addWeightRepsSet('normal', 95, 2, 8)
|
|
725
|
+
.addWeightRepsSet('normal', 100, 4, 7)
|
|
726
|
+
.addWeightRepsSet('normal', 100, 5, 6)
|
|
727
|
+
.addWeightRepsSet('normal', 100, 6, 7.5))
|
|
728
|
+
.build();
|
|
729
|
+
const routineUpdate = (0, routineUtils_1.minorRoutineUpdate)(routine, workout);
|
|
730
|
+
const expectedRoutineUpdate = new testUtils_1.RoutineUpdateBuilder()
|
|
731
|
+
.addExercise((it) => it
|
|
732
|
+
.setProps({
|
|
733
|
+
exerciseTemplateId: 'Bench Press',
|
|
734
|
+
inputModifier: 'rep-range',
|
|
735
|
+
})
|
|
736
|
+
.addWeightRepRangeSet('normal', 100, { start: 3, end: 5 }, 7) // 100kg, 3-5 reps, @7 RPE
|
|
737
|
+
.addWeightRepRangeSet('normal', 97, { start: 3, end: 5 })
|
|
738
|
+
.addWeightRepRangeSet('normal', 95, { start: null, end: 5 }, 7)
|
|
739
|
+
.addWeightRepRangeSet('normal', 100, { start: 3, end: null }, 7)
|
|
740
|
+
.addWeightRepRangeSet('normal', 100, { start: 5, end: null }, 7)
|
|
741
|
+
.addWeightRepRangeSet('normal', 100, { start: 6, end: null }))
|
|
742
|
+
.build();
|
|
743
|
+
expect(routineUpdate).toEqual(expectedRoutineUpdate);
|
|
744
|
+
});
|
|
745
|
+
});
|