diff --git a/curriculum/challenges/english/25-front-end-development/workshop-magazine/614389f601bb4f611db98563.md b/curriculum/challenges/english/25-front-end-development/workshop-magazine/614389f601bb4f611db98563.md index 6340d24607a..9d35ebd7807 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-magazine/614389f601bb4f611db98563.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-magazine/614389f601bb4f611db98563.md @@ -22,31 +22,31 @@ Add five `a` elements within that new `div`, and give them the following `href` You should create a new `div` element. ```js -assert(document.querySelectorAll('div')?.length === 2); +assert.lengthOf(document.querySelectorAll('div'), 2); ``` Your new `div` element should come after your `.author` element. ```js -assert(document.querySelector('.author')?.nextElementSibling?.localName === 'div'); +assert.equal(document.querySelector('.author')?.nextElementSibling?.localName, 'div'); ``` Your new `div` element should have the class `social-icons`. ```js -assert(document.querySelector('.author')?.nextElementSibling?.classList?.contains('social-icons')); +assert.isTrue(document.querySelector('.author')?.nextElementSibling?.classList?.contains('social-icons')); ``` Your `.social-icons` element should have five `a` elements. ```js -assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.length === 5); +assert.lengthOf(document.querySelector('.social-icons')?.querySelectorAll('a'), 5); ``` Your first `a` element should have an `href` set to `https://www.facebook.com/freecodecamp`. ```js -assert(document.querySelector('.social-icons')?.querySelectorAll('a')?.[0]?.getAttribute('href')?.includes('https://www.facebook.com/freecodecamp')); +assert.include(document.querySelector('.social-icons')?.querySelectorAll('a')?.[0]?.getAttribute('href'), 'https://www.facebook.com/freecodecamp'); ``` Your second `a` element should have an `href` set to `https://twitter.com/freecodecamp`. diff --git a/curriculum/challenges/english/25-front-end-development/workshop-magazine/61438b5b66d76a6264430f2a.md b/curriculum/challenges/english/25-front-end-development/workshop-magazine/61438b5b66d76a6264430f2a.md index a162ace63fe..f197eafbdf5 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-magazine/61438b5b66d76a6264430f2a.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-magazine/61438b5b66d76a6264430f2a.md @@ -20,7 +20,7 @@ Within each of your new `a` elements, add an `i` element and give them the follo You should have five `i` elements. ```js -assert(document.querySelectorAll('i')?.length === 5); +assert.lengthOf(document.querySelectorAll('i'), 5); ``` Each `a` element should only have one `i` element. @@ -51,31 +51,31 @@ iiiii?.forEach( The first `i` element should have a `class` attribute which includes `fa-facebook-f`. ```js -assert(document.querySelectorAll('i')?.[0]?.classList?.contains('fa-facebook-f')); +assert.isTrue(document.querySelectorAll('i')?.[0]?.classList?.contains('fa-facebook-f')); ``` The second `i` element should have a `class` attribute which includes `fa-twitter`. ```js -assert(document.querySelectorAll('i')?.[1]?.classList?.contains('fa-twitter')); +assert.isTrue(document.querySelectorAll('i')?.[1]?.classList?.contains('fa-twitter')); ``` The third `i` element should have a `class` attribute which includes `fa-instagram`. ```js -assert(document.querySelectorAll('i')?.[2]?.classList?.contains('fa-instagram')); +assert.isTrue(document.querySelectorAll('i')?.[2]?.classList?.contains('fa-instagram')); ``` The fourth `i` element should have a `class` attribute which includes `fa-linkedin-in`. ```js -assert(document.querySelectorAll('i')?.[3]?.classList?.contains('fa-linkedin-in')); +assert.isTrue(document.querySelectorAll('i')?.[3]?.classList?.contains('fa-linkedin-in')); ``` The fifth `i` element should have a `class` attribute which includes `fa-youtube`. ```js -assert(document.querySelectorAll('i')?.[4]?.classList?.contains('fa-youtube')); +assert.isTrue(document.querySelectorAll('i')?.[4]?.classList?.contains('fa-youtube')); ``` # --seed--