From d51e4ba7bb14170f5bb5c46a21b6cbac594d6423 Mon Sep 17 00:00:00 2001 From: Samuel Oommen <94606164+fullstacksam23@users.noreply.github.com> Date: Thu, 10 Jul 2025 00:41:15 +0530 Subject: [PATCH] chore(curriculum): update asserts steps 24-25 in the magazine workshop (#61251) --- .../workshop-magazine/6143d003ad9e9d76766293ec.md | 14 +++++++------- .../workshop-magazine/6143d2842b497779bad947de.md | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/curriculum/challenges/english/25-front-end-development/workshop-magazine/6143d003ad9e9d76766293ec.md b/curriculum/challenges/english/25-front-end-development/workshop-magazine/6143d003ad9e9d76766293ec.md index d88bf1c1866..9f22819ae86 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-magazine/6143d003ad9e9d76766293ec.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-magazine/6143d003ad9e9d76766293ec.md @@ -14,34 +14,34 @@ Within your `.image-quote` element, nest an `hr` element, a `p` element and a se You should add two `hr` elements to your `.image-quote` element. ```js -assert(document.querySelectorAll('.image-quote hr')?.length === 2); +assert.lengthOf(document.querySelectorAll('.image-quote hr'), 2); ``` You should add a `p` element to your `.image-quote` element. ```js -assert(document.querySelectorAll('.image-quote p')?.length === 1); +assert.lengthOf(document.querySelectorAll('.image-quote p'), 1); ``` Your `.image-quote` children should be in the correct order. ```js const children = document.querySelector('.image-quote')?.children; -assert(children?.[0]?.localName === 'hr'); -assert(children?.[1]?.localName === 'p'); -assert(children?.[2]?.localName === 'hr'); +assert.equal(children?.[0]?.localName, 'hr'); +assert.equal(children?.[1]?.localName, 'p'); +assert.equal(children?.[2]?.localName, 'hr'); ``` Your new `p` element should have a `class` set to `quote`. ```js -assert(document.querySelector('.image-quote p')?.classList.contains('quote')); +assert.isTrue(document.querySelector('.image-quote p')?.classList.contains('quote')); ``` 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.`. ```js -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.'); +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.'); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-magazine/6143d2842b497779bad947de.md b/curriculum/challenges/english/25-front-end-development/workshop-magazine/6143d2842b497779bad947de.md index ae56c357ce2..bff07724218 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-magazine/6143d2842b497779bad947de.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-magazine/6143d2842b497779bad947de.md @@ -16,25 +16,25 @@ Set the `padding` and `margin` properties both to `0` and set the `box-sizing` p You should have a `*, ::before, ::after` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')); +assert.exists(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')); ``` Your `*, ::before, ::after` selector should have a `padding` property set to `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.padding === '0px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.padding, '0px'); ``` Your `*, ::before, ::after` selector should have a `margin` property set to `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.margin === '0px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.margin, '0px'); ``` Your `*, ::before, ::after` selector should have a `box-sizing` property set to `border-box`. ```js -assert(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.boxSizing === 'border-box'); +assert.equal(new __helpers.CSSHelp(document).getStyle('*, ::before, ::after')?.boxSizing, 'border-box'); ``` # --seed--