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:
Ezoh Zhang
2025-10-06 19:33:52 +01:00
committed by GitHub
parent 0d7de236a6
commit f002f1b835
@@ -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