From d3652470ac2ee5e1f9dceea895096b1187fa3233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lasse=20J=C3=B8rgensen?= <28780271+lasjorg@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:00:42 +0200 Subject: [PATCH] fix(curriculum) Recipe Tracker - Step 6, cross platform variables tests (#59501) --- .../66fbcf750a62784cf11f5630.md | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/curriculum/challenges/english/25-front-end-development/workshop-recipe-tracker/66fbcf750a62784cf11f5630.md b/curriculum/challenges/english/25-front-end-development/workshop-recipe-tracker/66fbcf750a62784cf11f5630.md index 77e052536fb..14af1d20105 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-recipe-tracker/66fbcf750a62784cf11f5630.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-recipe-tracker/66fbcf750a62784cf11f5630.md @@ -20,12 +20,7 @@ Also delete the `recipe1Name`, `recipe2Name`, `recipe1CookingTime`, and `recipe2 You should remove the `recipe1Name` variable. ```js -try { - recipe1Name; - assert.fail('Variable is defined/declared'); -} catch (e) { - assert.include(e?.message, 'recipe1Name is not defined'); -} +assert.throws(() => recipe1Name, ReferenceError); ``` You should remove the `console.log(recipe1Name);` statement. @@ -37,12 +32,7 @@ assert.notMatch(__helpers.removeJSComments(code), /console\s*\.\s*log\s*\(\s*rec You should remove the `recipe2Name` variable. ```js -try { - recipe2Name; - assert.fail('Variable is defined/declared'); -} catch (e) { - assert.include(e?.message, 'recipe2Name is not defined'); -} +assert.throws(() => recipe2Name, ReferenceError); ``` You should remove the `console.log(recipe2Name);` statement. @@ -54,12 +44,7 @@ assert.notMatch(__helpers.removeJSComments(code), /console\s*\.\s*log\s*\(\s*rec You should remove the `recipe1CookingTime` variable. ```js -try { - recipe1CookingTime; - assert.fail('Variable is defined/declared'); -} catch (e) { - assert.include(e?.message, 'recipe1CookingTime is not defined'); -} +assert.throws(() => recipe1CookingTime, ReferenceError); ``` You should remove the `console.log(recipe1CookingTime);` statement. @@ -71,12 +56,7 @@ assert.notMatch(__helpers.removeJSComments(code), /console\s*\.\s*log\s*\(\s*rec You should remove the `recipe2CookingTime` variable. ```js -try { - recipe2CookingTime; - assert.fail('Variable is defined/declared'); -} catch (e) { - assert.include(e?.message, 'recipe2CookingTime is not defined'); -} +assert.throws(() => recipe2CookingTime, ReferenceError); ``` You should remove the `console.log(recipe2CookingTime);` statement.