Skip to content
This repository was archived by the owner on Sep 25, 2019. It is now read-only.

fix(challenges): converts delete html tests to regex#253

Merged
scissorsneedfoodtoo merged 1 commit intofreeCodeCamp:devfrom
joshalling:fix/delete-html-elements-regex
Aug 23, 2018
Merged

fix(challenges): converts delete html tests to regex#253
scissorsneedfoodtoo merged 1 commit intofreeCodeCamp:devfrom
joshalling:fix/delete-html-elements-regex

Conversation

@joshalling
Copy link
Copy Markdown
Member

Description

This code converts the tests of the Delete HTML Elements challenge to use regex instead of jQuery. This prevents some weird behavior as shown below. This change also makes it possible to add a solution to be tested with the test suite so I included that as well.

The following code currently passes, but it will not pass with this change:

Hello World</h1>

<h2>

<p>

My actual changes start on line 568 and go through 587.

Pre-Submission Checklist

  • Your pull request targets the dev branch.
  • Branch starts with either fix/, feature/, or translate/ (e.g. fix/challenge-tests)
  • All new and existing tests pass the command npm test.
  • Use npm run commit to generate a conventional commit message.
    Learn more here: https://conventionalcommits.org/#why-use-conventional-commits
  • The changes were done locally on your machine and NOT GitHub web interface.
    If they were done on the web interface you have ensured that you are creating conventional commit messages.

Checklist:

  • Tested changes locally.
  • Addressed currently open issue (replace XXXXX with an issue no in next line)

Closes #251

Also, adds a solution to be tested with the test suite.

ISSUES CLOSED: freeCodeCamp#251
@joshalling joshalling changed the title fix(challenges): converts delete html test to regex fix(challenges): converts delete html tests to regex Aug 15, 2018
@scissorsneedfoodtoo scissorsneedfoodtoo merged commit d80d98d into freeCodeCamp:dev Aug 23, 2018
@scissorsneedfoodtoo
Copy link
Copy Markdown
Contributor

Sorry for the delay in reviewing this. Everything LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants