fix(curriculum): trim spaces in Build a Storytelling App (#63951)

This commit is contained in:
Diem-Trang Pham
2025-11-19 01:30:37 -06:00
committed by GitHub
parent 902c8222ad
commit 17ea34e084
2 changed files with 12 additions and 8 deletions

View File

@@ -17,8 +17,9 @@ Begin by creating an `h1` element and give it a text `Want to hear a short story
You should have an `h1` with the text `Want to hear a short story?`.
```js
assert.exists(document.querySelector('h1'));
assert.equal(document.querySelector('h1').textContent, 'Want to hear a short story?');
const h1 = document.querySelector('h1');
assert.exists(h1);
assert.equal(h1.textContent.trim(), 'Want to hear a short story?');
```
# --seed--

View File

@@ -26,22 +26,25 @@ assert.equal(document.querySelectorAll('.btn-container > .btn').length, 3);
You should have a button with the `id` of `scary-btn` and a text of `Scary Story`.
```js
assert.exists(document.querySelector('#scary-btn'));
assert.equal(document.querySelector('#scary-btn').textContent, 'Scary Story');
const scaryBtn = document.querySelector('#scary-btn');
assert.exists(scaryBtn);
assert.equal(scaryBtn.textContent.trim(), 'Scary Story');
```
You should have a button with the `id` of `funny-btn` and a text of `Funny Story`.
```js
assert.exists(document.querySelector('#funny-btn'));
assert.equal(document.querySelector('#funny-btn').textContent, 'Funny Story');
const funnyBtn = document.querySelector('#funny-btn');
assert.exists(funnyBtn);
assert.equal(funnyBtn.textContent.trim(), 'Funny Story');
```
You should have a button with the `id` of `adventure-btn` and a text of `Adventure Story`.
```js
assert.exists(document.querySelector('#adventure-btn'));
assert.equal(document.querySelector('#adventure-btn').textContent, 'Adventure Story');
const adventureBtn = document.querySelector('#adventure-btn');
assert.exists(adventureBtn);
assert.equal(adventureBtn.textContent.trim(), 'Adventure Story');
```
# --seed--