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

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

@joshalling

Description

@joshalling

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions