mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-07 06:02:06 -04:00
chore: update asserts in step 19 tests (#61118)
This commit is contained in:
@@ -23,7 +23,7 @@ Then give the `h4` and `p` elements the following text content, in order, with e
|
||||
Your `ul` element should have six `li` elements.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li')?.length === 6);
|
||||
assert.lengthOf(document.querySelectorAll('.lists li'), 6);
|
||||
```
|
||||
|
||||
Each of your new `li` elements should have an `h4` and `p` element.
|
||||
@@ -40,73 +40,73 @@ lis.forEach(li => {
|
||||
Your first `h4` should have the text `V1 - 2014`.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li h4')?.[0]?.innerText === 'V1 - 2014');
|
||||
assert.equal(document.querySelectorAll('.lists li h4')?.[0]?.innerText, 'V1 - 2014');
|
||||
```
|
||||
|
||||
Your first `p` should have the text `We launched freeCodeCamp with a simple list of 15 resources, including Harvard's CS50 and Stanford's Database Class.`
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li p')?.[0]?.innerText === 'We launched freeCodeCamp with a simple list of 15 resources, including Harvard\'s CS50 and Stanford\'s Database Class.');
|
||||
assert.equal(document.querySelectorAll('.lists li p')?.[0]?.innerText, 'We launched freeCodeCamp with a simple list of 15 resources, including Harvard\'s CS50 and Stanford\'s Database Class.');
|
||||
```
|
||||
|
||||
Your second `h4` should have the text `V2 - 2015`.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li h4')?.[1]?.innerText === 'V2 - 2015');
|
||||
assert.equal(document.querySelectorAll('.lists li h4')?.[1]?.innerText, 'V2 - 2015');
|
||||
```
|
||||
|
||||
Your second `p` should have the text `We added interactive algorithm challenges.`
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li p')?.[1]?.innerText === 'We added interactive algorithm challenges.');
|
||||
assert.equal(document.querySelectorAll('.lists li p')?.[1]?.innerText, 'We added interactive algorithm challenges.');
|
||||
```
|
||||
|
||||
Your third `h4` should have the text `V3 - 2015`.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li h4')?.[2]?.innerText === 'V3 - 2015');
|
||||
assert.equal(document.querySelectorAll('.lists li h4')?.[2]?.innerText, 'V3 - 2015');
|
||||
```
|
||||
|
||||
Your third `p` should have the text `We added our own HTML+CSS challenges (before we'd been relying on General Assembly's Dash course for these).`
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li p')?.[2]?.innerText === 'We added our own HTML+CSS challenges (before we\'d been relying on General Assembly\'s Dash course for these).');
|
||||
assert.equal(document.querySelectorAll('.lists li p')?.[2]?.innerText, 'We added our own HTML+CSS challenges (before we\'d been relying on General Assembly\'s Dash course for these).');
|
||||
```
|
||||
|
||||
Your fourth `h4` should have the text `V4 - 2016`.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li h4')?.[3]?.innerText === 'V4 - 2016');
|
||||
assert.equal(document.querySelectorAll('.lists li h4')?.[3]?.innerText, 'V4 - 2016');
|
||||
```
|
||||
|
||||
Your fourth `p` should have the text `We expanded the curriculum to 3 certifications, including Front End, Back End, and Data Visualization. They each had 10 required projects, but only the Front End section had its own challenges. For the other certs, we were still using external resources like Node School.`
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li p')?.[3]?.innerText === 'We expanded the curriculum to 3 certifications, including Front End, Back End, and Data Visualization. They each had 10 required projects, but only the Front End section had its own challenges. For the other certs, we were still using external resources like Node School.');
|
||||
assert.equal(document.querySelectorAll('.lists li p')?.[3]?.innerText, 'We expanded the curriculum to 3 certifications, including Front End, Back End, and Data Visualization. They each had 10 required projects, but only the Front End section had its own challenges. For the other certs, we were still using external resources like Node School.');
|
||||
```
|
||||
|
||||
Your fifth `h4` should have the text `V5 - 2017`.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li h4')?.[4]?.innerText === 'V5 - 2017');
|
||||
assert.equal(document.querySelectorAll('.lists li h4')?.[4]?.innerText, 'V5 - 2017');
|
||||
```
|
||||
|
||||
Your fifth `p` should have the text `We added the back end and data visualization challenges.`
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li p')?.[4]?.innerText === 'We added the back end and data visualization challenges.');
|
||||
assert.equal(document.querySelectorAll('.lists li p')?.[4]?.innerText, 'We added the back end and data visualization challenges.');
|
||||
```
|
||||
|
||||
Your sixth `h4` should have the text `V6 - 2018`.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li h4')?.[5]?.innerText === 'V6 - 2018');
|
||||
assert.equal(document.querySelectorAll('.lists li h4')?.[5]?.innerText, 'V6 - 2018');
|
||||
```
|
||||
|
||||
Your sixth `p` should have the text `We launched 6 new certifications to replace our old ones. This was the biggest curriculum improvement to date.`
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('.lists li p')?.[5]?.innerText === 'We launched 6 new certifications to replace our old ones. This was the biggest curriculum improvement to date.');
|
||||
assert.equal(document.querySelectorAll('.lists li p')?.[5]?.innerText, 'We launched 6 new certifications to replace our old ones. This was the biggest curriculum improvement to date.');
|
||||
```
|
||||
|
||||
Your six `h4` elements should each have the class `list-subtitle`.
|
||||
|
||||
Reference in New Issue
Block a user