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

fix(challenges): add missing test to check for css class #258

Merged
merged 1 commit into from
Aug 24, 2018
Merged

fix(challenges): add missing test to check for css class #258

merged 1 commit into from
Aug 24, 2018

Conversation

Nirajn2311
Copy link
Member

ISSUES CLOSED: #254

Description

I have added the below test

        {
          "text":
            "Define a class named <code>silver-background</code> within the <code>style</code> element and assign the value of <code>silver</code> to the <code>background-color</code> property.",
          "testString":
            "assert(code.match(/\\.silver-background\\s*{\\s*background-color:\\s*silver;\\s*}/), \"Define a class named <code>silver-background</code> within the <code>style</code> element and assign the value of <code>silver</code> to the <code>background-color</code> property.\");"
        }

The test checks if there is a silver-background class in the style element and makes the sure the below code doesn't pass the test.

  div { /* This should not pass the tests */
    background-color: silver;
  }

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 #254

@Nirajn2311 Nirajn2311 changed the title fix(challenges): add missing test to check for for css class fix(challenges): add missing test to check for css class Aug 17, 2018
Copy link
Member

@joshalling joshalling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@scissorsneedfoodtoo scissorsneedfoodtoo merged commit 6e42f53 into freeCodeCamp:dev Aug 24, 2018
@scissorsneedfoodtoo
Copy link
Contributor

@Nirajn2311, thank you for this fix! Merging now.

And thank you for helping to QA this, @joshalling.

@Nirajn2311 Nirajn2311 deleted the fix/add-missing-test branch August 24, 2018 13:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants