diff options
Diffstat (limited to 'app/domain/__tests__/user_spec.js')
| -rw-r--r-- | app/domain/__tests__/user_spec.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/app/domain/__tests__/user_spec.js b/app/domain/__tests__/user_spec.js new file mode 100644 index 0000000..dfe4d26 --- /dev/null +++ b/app/domain/__tests__/user_spec.js @@ -0,0 +1,35 @@ +class User { + constructor(bodyWeight: 0) { + this.bodyWeight = bodyWeight; + } + + switchTo(program) { } + + nextWorkoutFor(routine) { + return new Workout(this.bodyWeight); + } +} + +class StrongliftsProgram { + routine(name) { + } +} + +class Workout { + constructor(bodyWeight = 0) { + this.bodyWeight = bodyWeight; + } +} + +describe("User", () => { + it ("creates the next workout", function() { + const program = new StrongliftsProgram(); + const user = new User(240); + const routineA = program.routine("A") + + user.switchTo(program) + const workout = user.nextWorkoutFor(routineA); + + expect(workout.bodyWeight).toEqual(240); + }); +}); |
