fix(curriculum): correct assert usage in workshop-cat-painting (#60028)

This commit is contained in:
Shaurya Bisht
2025-04-28 17:45:17 +05:30
committed by GitHub
parent da5392ed0f
commit e0274556fa

View File

@@ -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--