diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66984eef66cc1752d93b53f5.md b/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66984eef66cc1752d93b53f5.md index 5a8920ffa38..c08f5f27fb5 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66984eef66cc1752d93b53f5.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66984eef66cc1752d93b53f5.md @@ -18,26 +18,27 @@ Add a `head` element above the `body` element. You have either deleted the `body` element or it is missing an opening tag or closing tag. ```js -assert(document.querySelector('body') && code.match(/<\/body>/)); +assert.exists(document.querySelector('body')); +assert.match(code, /<\/body>/); ``` Your `head` element should have an opening tag. Opening tags have the following syntax: ``. ```js -assert(code.match(/\/)); +assert.match(code, /\/); ``` Your `head` element should have a closing tag. Closing tags have a `/` just after the `<` character. ```js -assert(code.match(/\<\/head\>/)); +assert.match(code, /\<\/head\>/); ``` Your `head` element should be above the opening `body` element tag. You have put it somewhere else. ```js const noSpaces = code.replace(/\s/g, ''); -assert(noSpaces.match(/\<\/head\>\/)); +assert.match(noSpaces, /\<\/head\>\/); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66984fe8efbd8c53a78c9b62.md b/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66984fe8efbd8c53a78c9b62.md index e6fd86e8651..e3b1f5a190f 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66984fe8efbd8c53a78c9b62.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66984fe8efbd8c53a78c9b62.md @@ -18,26 +18,27 @@ Add a `title` element within the `head` element using the text below: You have either deleted the `head` element or it is missing an opening tag or closing tag. ```js -assert(code.match(/\/) && code.match(/\<\/head\>/)); +assert.match(code, /\/); +assert.match(code, /\<\/head\>/); ``` Your `title` element should be nested in the `head` element. Make sure to add an opening tag and closing tag for the `title` element. ```js const noSpaces = code.replace(/\s/g, ''); -assert(noSpaces.match(/\\.*\<\/title\>\<\/head\>/)); +assert.match(noSpaces, /\\.*\<\/title\>\<\/head\>/); ``` Your `title` element should have a closing tag. Closing tags have a `/` just after the `<` character. ```js -assert(code.match(/\<\/title\>/)); +assert.match(code, /\<\/title\>/); ``` Your `title` element's text should be `CatPhotoApp`. You have either omitted the text or have a typo. ```js -assert(document.title && document.title.toLowerCase() === 'catphotoapp'); +assert.equal(document.title?.toLowerCase(), 'catphotoapp'); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66985068aeb06e54562df39e.md b/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66985068aeb06e54562df39e.md index a4859f2ab36..0cf72b7c855 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66985068aeb06e54562df39e.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/66985068aeb06e54562df39e.md @@ -18,14 +18,15 @@ Add the `lang` attribute with the value `en` to the opening `html` tag to specif You have either deleted the `html` element or it is missing an opening tag or closing tag. ```js -assert(code.match(/\/) && code.match(/\<\/html\>/)); +assert.match(code, /\/); +assert.match(code, /\<\/html\>/); ``` Your `html` element should have a `lang` attribute with the value `en`. You may have omitted the attribute/value, or have a typo. ```js const extraSpacesRemoved = code.replace(/\s+/g, " "); -assert(extraSpacesRemoved.match(/\/)); +assert.match(extraSpacesRemoved, /\/); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/669850ce0ccf395511ff4254.md b/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/669850ce0ccf395511ff4254.md index dc0644b3b8b..64929f133c4 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/669850ce0ccf395511ff4254.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/669850ce0ccf395511ff4254.md @@ -18,14 +18,14 @@ Add this declaration as the first line of the code. Your code should begin with the declaration ``. You may have omitted the declaration, have a typo, or it is not the first line of code. ```js -assert(code.match(/\<\s*!DOCTYPE\s+html\s*\>/)); +assert.match(code, /\<\s*!DOCTYPE\s+html\s*\>/); ``` Your `` must be located at the top of the document. ```js const noSpaces = code.replace(/\s/g, ''); -assert(noSpaces.match(/^\<\!DOCTYPEhtml\>\\