mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): enforce variable usage in sentence maker lab (#62078)
Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
This commit is contained in:
@@ -133,6 +133,15 @@ const expected = `Once upon a time, there was a(n) ${_initialValues['adjective']
|
||||
assert.strictEqual(firstStory, expected);
|
||||
```
|
||||
|
||||
You should assemble your first story using the variables you declared in the correct order.
|
||||
|
||||
```js
|
||||
assert.match(
|
||||
__helpers.removeJSComments(code),
|
||||
/firstStory\s*=\s*.*?adjective.*?noun.*?noun2.*?noun.*?place.*?adjective2.*?verb/
|
||||
);
|
||||
```
|
||||
|
||||
You should log your first story using the message `"First story: [firstStory]"`.
|
||||
|
||||
```js
|
||||
@@ -190,6 +199,15 @@ const expected = `Once upon a time, there was a(n) ${adjective} ${noun} who love
|
||||
assert.strictEqual(secondStory, expected);
|
||||
```
|
||||
|
||||
You should assemble your second story using the variables you declared in the correct order.
|
||||
|
||||
```js
|
||||
assert.match(
|
||||
__helpers.removeJSComments(code),
|
||||
/secondStory\s*=\s*.*?adjective.*?noun.*?noun2.*?noun.*?place.*?adjective2.*?verb/
|
||||
);
|
||||
```
|
||||
|
||||
You should log your second story using the format `"Second story: [secondStory]"`.
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user