freeCodeCamp / curriculum

The freeCodeCamp curriculum and lesson editor
Creative Commons Attribution Share Alike 4.0 International
81 stars 125 forks source link

Delete HTML Elements passes when you only remove the opening tag. #251

Closed joshalling closed 6 years ago

joshalling commented 6 years ago

Describe the bug

You can pass the test if you only remove the opening h1 tag.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Remove the opening <h1> tag
  3. Click run the tests
  4. It passes when it shouldn't

Expected behavior

You should be required to delete the entire h1 element

Additional context

This happens because the tests are using jQuery to find the elements in this challenge. Selectors in jQuery are only looking for an opening tag so it doesn't matter in the closing tag is left behind. I think we should change the tests to use regex so that we can make sure the entire element has been removed. Using regex instead of jQuery will also allow us to add a solution for this challenge to be tested in the test suite.

raisedadead commented 6 years ago

:tada: This issue has been resolved in version 3.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: