fix(curriculum): update calorie counter step 77 to not allow extra addition (#55842)
Co-authored-by: Lasse Jørgensen <28780271+lasjorg@users.noreply.github.com> Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>pull/55749/head^2
parent
f01ff30dc6
commit
59a2eac925
|
@ -26,13 +26,13 @@ assert.isAbove(calculateCalories.toString().indexOf('consumedCalories'), calcula
|
|||
You should calculate the sum of `breakfastCalories`, `lunchCalories`, `dinnerCalories`, and `snacksCalories`, in order.
|
||||
|
||||
```js
|
||||
assert.match(calculateCalories.toString(), /breakfastCalories\s*\+\s*lunchCalories\s*\+\s*dinnerCalories\s*\+\s*snacksCalories/);
|
||||
assert.match(calculateCalories.toString(), /breakfastCalories\s*\+\s*lunchCalories\s*\+\s*dinnerCalories\s*\+\s*snacksCalories\s*;?\s*$/m);
|
||||
```
|
||||
|
||||
You should assign the sum of `breakfastCalories`, `lunchCalories`, `dinnerCalories`, and `snacksCalories` to `consumedCalories`.
|
||||
|
||||
```js
|
||||
assert.match(calculateCalories.toString(), /consumedCalories\s*=\s*breakfastCalories\s*\+\s*lunchCalories\s*\+\s*dinnerCalories\s*\+\s*snacksCalories/);
|
||||
assert.match(calculateCalories.toString(), /consumedCalories\s*=\s*breakfastCalories\s*\+\s*lunchCalories\s*\+\s*dinnerCalories\s*\+\s*snacksCalories\s*;?\s*$/m);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
|
Loading…
Reference in New Issue