Fixed issue which was causing problem while testing for headings challenge (#19590)
* Update use-headings-to-show-hierarchical-relationships-of-content.english.md * Update use-headings-to-show-hierarchical-relationships-of-content.english.md * Update use-headings-to-show-hierarchical-relationships-of-content.english.md * fix(tests): for closing tags * Update use-headings-to-show-hierarchical-relationships-of-content.english.md * Update use-headings-to-show-hierarchical-relationships-of-content.english.mdpull/21780/head^2
parent
f7d39a3a58
commit
fd8414062d
|
@ -17,7 +17,7 @@ One final point, each page should always have one (and only one) <code>h1</code>
|
|||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
Camper Cat wants a page on his site dedicated to becoming a ninja. Help him fix the headings so his markup gives semantic meaning to the content, and shows the proper parent-child relationships of his sections. Change all the <code>h5</code> tags to the proper heading level to indicate they are subsections of the <code>h2</code> ones.
|
||||
Camper Cat wants a page on his site dedicated to becoming a ninja. Help him fix the headings so his markup gives semantic meaning to the content, and shows the proper parent-child relationships of his sections. Change all the <code>h5</code> tags to the proper heading level to indicate they are subsections of the <code>h2</code> ones. Use <code>h3</code> tags for the purpose.
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
|
@ -25,11 +25,14 @@ Camper Cat wants a page on his site dedicated to becoming a ninja. Help him fix
|
|||
|
||||
```yml
|
||||
tests:
|
||||
- text: Your code should have six <code>h3</code> tags.
|
||||
testString: assert($('h3').length === 6, 'Your code should have six <code>h3</code> tags.');
|
||||
- text: Your code should have 6 <code>h3</code> tags.
|
||||
testString: assert($("h3").length === 6, 'Your code should have 6 <code>h3</code> tags.');
|
||||
- text: Your code should have 6 <code>h3</code> closing tags.
|
||||
testString: assert((code.match(/\/h3/g) || []).length===6,'Your code should have 6 <code>h3</code> closing tags.');
|
||||
- text: Your code should not have any <code>h5</code> tags.
|
||||
testString: assert($('h5').length === 0, 'Your code should not have any <code>h5</code> tags.');
|
||||
|
||||
testString: assert($("h5").length === 0, "Your code should not have any <code>h5</code> tags.");
|
||||
- text: Your code should not have any <code>h5</code> closing tags.
|
||||
testString: assert(/\/h5/.test(code)===false, 'Your code should not have any <code>h5</code> closing tags');
|
||||
```
|
||||
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue