mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
fix(curriculum) Recipe Tracker - Step 6, cross platform variables tests (#59501)
This commit is contained in:
parent
6d8922f8bd
commit
d3652470ac
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user