mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): fix test assertions in step7 of recipe tracker workshop (#65149)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
+14
-26
@@ -15,6 +15,12 @@ Also delete the `recipe1Name`, `recipe2CookingTime` and `recipe3Ingredients` var
|
||||
|
||||
# --hints--
|
||||
|
||||
You should push all the recipe objects into the `recipes` array. Make sure to push them in the order they are declared.
|
||||
|
||||
```js
|
||||
assert.deepEqual(recipes, [recipe1, recipe2, recipe3]);
|
||||
```
|
||||
|
||||
You should remove the `recipe1Name` variable.
|
||||
|
||||
```js
|
||||
@@ -27,30 +33,6 @@ You should remove the `console.log(recipe1Name);` statement.
|
||||
assert.notMatch(__helpers.removeJSComments(code), /console\s*\.\s*log\s*\(\s*recipe1Name\s*\)\s*;?/);
|
||||
```
|
||||
|
||||
You should remove the `recipe2Name` variable.
|
||||
|
||||
```js
|
||||
assert.throws(() => recipe2Name, ReferenceError);
|
||||
```
|
||||
|
||||
You should remove the `console.log(recipe2Name);` statement.
|
||||
|
||||
```js
|
||||
assert.notMatch(__helpers.removeJSComments(code), /console\s*\.\s*log\s*\(\s*recipe2Name\s*\)\s*;?/);
|
||||
```
|
||||
|
||||
You should remove the `recipe1CookingTime` variable.
|
||||
|
||||
```js
|
||||
assert.throws(() => recipe1CookingTime, ReferenceError);
|
||||
```
|
||||
|
||||
You should remove the `console.log(recipe1CookingTime);` statement.
|
||||
|
||||
```js
|
||||
assert.notMatch(__helpers.removeJSComments(code), /console\s*\.\s*log\s*\(\s*recipe1CookingTime\s*\)\s*;?/);
|
||||
```
|
||||
|
||||
You should remove the `recipe2CookingTime` variable.
|
||||
|
||||
```js
|
||||
@@ -63,10 +45,16 @@ You should remove the `console.log(recipe2CookingTime);` statement.
|
||||
assert.notMatch(__helpers.removeJSComments(code), /console\s*\.\s*log\s*\(\s*recipe2CookingTime\s*\)\s*;?/);
|
||||
```
|
||||
|
||||
You should push all the recipes objects into the `recipes` array. Make sure to push them in the order they are declared.
|
||||
You should remove the `recipe3Ingredients` variable.
|
||||
|
||||
```js
|
||||
assert.deepEqual(recipes, [recipe1, recipe2, recipe3]);
|
||||
assert.throws(() => recipe3Ingredients, ReferenceError);
|
||||
```
|
||||
|
||||
You should remove the `console.log(recipe3Ingredients);` statement.
|
||||
|
||||
```js
|
||||
assert.notMatch(__helpers.removeJSComments(code), /console\s*\.\s*log\s*\(\s*recipe3Ingredients\s*\)\s*;?/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user