fix(learn): Improve tests for the Nest an Anchor Element within a Paragraph challenge (#41456)

This commit is contained in:
Randell Dawson
2021-03-12 10:09:22 -07:00
committed by GitHub
parent d74a6ec539
commit c198d508be

View File

@ -43,11 +43,19 @@ Nest the existing `a` element within a new `p` element. The new paragraph should
# --hints-- # --hints--
You should have an `a` element that links to "`https://freecatphotoapp.com`". You should only have one `a` element.
```js ```js
assert( assert(
$('a[href="https://freecatphotoapp.com"]').length > 0 $('a').length === 1
);
```
The `a` element should link to "`https://freecatphotoapp.com`".
```js
assert(
$('a[href="https://freecatphotoapp.com"]').length === 1
); );
``` ```
@ -61,7 +69,7 @@ assert(
); );
``` ```
You should create a new `p` element around your `a` element. There should be at least 3 total `p` tags in your HTML code. You should create a new `p` element. There should be at least 3 total `p` tags in your HTML code.
```js ```js
assert($('p') && $('p').length > 2); assert($('p') && $('p').length > 2);