There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
This never happened in any other exercises so far… is it because the HTML string is already using a set of single quotation marks? Or am I missing something?
Yes, it’s a CSS selector. The backend engineering path doesn’t cover CSS enough prior to this point. It just slips it in and expects us to know or find out on our own. Just another disjointed thing that causes unnecessary stress and wastes time in this path.
For our tests, once we retrieve the response from the server, we use assert.include() from the Chai library to check the response.
assert.include(parseTextFromHTML(response.text, ‘#my-name’), “My Name”); //True
Why does the hint for the first task tell us to use equal instead of include?
Use assert.equal to check the text returned from parseTextFromHTML().