mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-23 22:00:38 -04:00
fix(curriculum): correct assert usage in workshop-cat-painting (#60028)
This commit is contained in:
@@ -14,25 +14,25 @@ Back in your HTML, create a `main` element. Inside that `main` element, add a `d
|
||||
You should have a `main` element.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('main').length === 1);
|
||||
assert.lengthOf(document.querySelectorAll('main'), 1);
|
||||
```
|
||||
|
||||
You should have a `div` element.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('div').length === 1);
|
||||
assert.lengthOf(document.querySelectorAll('div'), 1);
|
||||
```
|
||||
|
||||
Your `div` element should have the class `cat-head`.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('div')?.getAttribute('class') === 'cat-head');
|
||||
assert.equal(document.querySelector('div')?.getAttribute('class'), 'cat-head');
|
||||
```
|
||||
|
||||
Your `div` element should be inside your `main` tag.
|
||||
|
||||
```js
|
||||
assert(document.querySelectorAll('main div').length === 1);
|
||||
assert.lengthOf(document.querySelectorAll('main div'), 1);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user