mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
fix(curriculum): tests in event hub lab (#57998)
This commit is contained in:
parent
762c53b69a
commit
6ad2f63ff6
@ -159,10 +159,10 @@ const h2Element = document.querySelector('#upcoming-events h2');
|
||||
assert.strictEqual(h2Element?.innerText, "Upcoming Events");
|
||||
```
|
||||
|
||||
Inside the `#upcoming-events` section, you should have two `article` elements.
|
||||
Inside the `#upcoming-events` section, you should have two `article` elements below the `h2` element.
|
||||
|
||||
```js
|
||||
const articleElements = document.querySelectorAll('#upcoming-events article');
|
||||
const articleElements = document.querySelectorAll('#upcoming-events h2 ~ article');
|
||||
assert.strictEqual(articleElements.length, 2);
|
||||
```
|
||||
|
||||
@ -187,10 +187,10 @@ const h2Element = document.querySelector('#past-events h2');
|
||||
assert.strictEqual(h2Element?.innerText, "Past Events");
|
||||
```
|
||||
|
||||
Inside the `#past-events` section, you should have two `article` elements.
|
||||
Inside the `#past-events` section, you should have two `article` elements below the `h2` element.
|
||||
|
||||
```js
|
||||
const articleElements = document.querySelectorAll('#past-events article');
|
||||
const articleElements = document.querySelectorAll('#past-events h2 ~ article');
|
||||
assert.strictEqual(articleElements.length, 2);
|
||||
```
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user