fix(curriculum): updated assert methods (#60089)

This commit is contained in:
Faris
2025-05-02 04:00:45 +05:30
committed by GitHub
parent ca45f715c2
commit 62091ed265

View File

@@ -14,37 +14,37 @@ Create two `div` elements, the first inside the `.cat-left-ear` element with a c
You should not change the existing `div` element with the class `cat-left-ear`.
```js
assert(document.querySelectorAll('div.cat-left-ear').length === 1);
assert.lengthOf(document.querySelectorAll('div.cat-left-ear'), 1);
```
You should not change the existing `div` element with the class `cat-right-ear`.
```js
assert(document.querySelectorAll('div.cat-right-ear').length === 1);
assert.lengthOf(document.querySelectorAll('div.cat-right-ear'), 1);
```
You should have one `div` element inside your `.cat-left-ear` element.
```js
assert(document.querySelectorAll('.cat-left-ear div').length === 1);
assert.lengthOf(document.querySelectorAll('.cat-left-ear div'), 1);
```
You should have one `div` element inside your `.cat-right-ear` element.
```js
assert(document.querySelectorAll('.cat-right-ear div').length === 1);
assert.lengthOf(document.querySelectorAll('.cat-right-ear div'), 1);
```
The new `div` element inside `.cat-left-ear` should have the class `cat-left-inner-ear`.
```js
assert(document.querySelectorAll('.cat-left-ear div')[0]?.classList.contains('cat-left-inner-ear'));
assert.isTrue(document.querySelectorAll('.cat-left-ear div')[0]?.classList.contains('cat-left-inner-ear'));
```
The new `div` element inside `.cat-right-ear` should have the class `cat-right-inner-ear`.
```js
assert(document.querySelectorAll('.cat-right-ear div')[0]?.classList.contains('cat-right-inner-ear'));
assert.isTrue(document.querySelectorAll('.cat-right-ear div')[0]?.classList.contains('cat-right-inner-ear'));
```
# --seed--