Skip to content

Commit d51e4ba

Browse files
chore(curriculum): update asserts steps 24-25 in the magazine workshop (freeCodeCamp#61251)
1 parent 072903b commit d51e4ba

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

curriculum/challenges/english/25-front-end-development/workshop-magazine/6143d003ad9e9d76766293ec.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,34 @@ Within your `.image-quote` element, nest an `hr` element, a `p` element and a se
1414
You should add two `hr` elements to your `.image-quote` element.
1515

1616
```js
17-
assert(document.querySelectorAll('.image-quote hr')?.length === 2);
17+
assert.lengthOf(document.querySelectorAll('.image-quote hr'), 2);
1818
```
1919

2020
You should add a `p` element to your `.image-quote` element.
2121

2222
```js
23-
assert(document.querySelectorAll('.image-quote p')?.length === 1);
23+
assert.lengthOf(document.querySelectorAll('.image-quote p'), 1);
2424
```
2525

2626
Your `.image-quote` children should be in the correct order.
2727

2828
```js
2929
const children = document.querySelector('.image-quote')?.children;
30-
assert(children?.[0]?.localName === 'hr');
31-
assert(children?.[1]?.localName === 'p');
32-
assert(children?.[2]?.localName === 'hr');
30+
assert.equal(children?.[0]?.localName, 'hr');
31+
assert.equal(children?.[1]?.localName, 'p');
32+
assert.equal(children?.[2]?.localName, 'hr');
3333
```
3434
3535
Your new `p` element should have a `class` set to `quote`.
3636
3737
```js
38-
assert(document.querySelector('.image-quote p')?.classList.contains('quote'));
38+
assert.isTrue(document.querySelector('.image-quote p')?.classList.contains('quote'));
3939
```
4040
4141
Your new `p` element should have the text `The millions of people who are learning to code through freeCodeCamp will have an even better resource to help them learn these fundamentals.`.
4242
4343
```js
44-
assert(document.querySelector('.image-quote p')?.innerText === 'The millions of people who are learning to code through freeCodeCamp will have an even better resource to help them learn these fundamentals.');
44+
assert.equal(document.querySelector('.image-quote p')?.innerText, 'The millions of people who are learning to code through freeCodeCamp will have an even better resource to help them learn these fundamentals.');
4545
```
4646
4747
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-magazine/6143d2842b497779bad947de.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ Set the `padding` and `margin` properties both to `0` and set the `box-sizing` p
1616
You should have a `*, ::before, ::after` selector.
1717

1818
```js
19-
assert(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after'));
19+
assert.exists(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after'));
2020
```
2121

2222
Your `*, ::before, ::after` selector should have a `padding` property set to `0`.
2323

2424
```js
25-
assert(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.padding === '0px');
25+
assert.equal(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.padding, '0px');
2626
```
2727
2828
Your `*, ::before, ::after` selector should have a `margin` property set to `0`.
2929
3030
```js
31-
assert(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.margin === '0px');
31+
assert.equal(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.margin, '0px');
3232
```
3333
3434
Your `*, ::before, ::after` selector should have a `box-sizing` property set to `border-box`.
3535
3636
```js
37-
assert(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.boxSizing === 'border-box');
37+
assert.equal(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.boxSizing, 'border-box');
3838
```
3939
4040
# --seed--

0 commit comments

Comments
 (0)