From bc040eed1214f2e3f4962d3bf05a2d30f16061b5 Mon Sep 17 00:00:00 2001 From: Aditya Singh Date: Wed, 14 Jan 2026 19:24:08 +0530 Subject: [PATCH] fix(curriculum): fix test assertions in step7 of recipe tracker workshop (#65149) Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> --- .../66fbcf750a62784cf11f5630.md | 40 +++++++------------ 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/curriculum/challenges/english/blocks/workshop-recipe-tracker/66fbcf750a62784cf11f5630.md b/curriculum/challenges/english/blocks/workshop-recipe-tracker/66fbcf750a62784cf11f5630.md index 52ae024cdef..7f509ec2d80 100644 --- a/curriculum/challenges/english/blocks/workshop-recipe-tracker/66fbcf750a62784cf11f5630.md +++ b/curriculum/challenges/english/blocks/workshop-recipe-tracker/66fbcf750a62784cf11f5630.md @@ -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--