From 40e14c399961b7a8a95b511b337610b3ac859892 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sat, 15 Aug 2015 15:33:21 -0700 Subject: [PATCH] fix critical failing test in early waypoint --- seed/challenges/basic-javascript.json | 23 ++++++++++------------- seed/challenges/html5-and-css.json | 2 +- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 485e32772fa..5a6875548ac 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -992,25 +992,23 @@ "title": "Sift through Text with Regular Expressions", "difficulty":"9.984", "description":[ - "RegEx is a powerful tool we can use to find certain words or patterns in strings.", - "RegEx can look difficult at first but there's not much to getting it working.", - "If we wanted to find the number of times the word the occurred in the string The dog chased the cat We could use the following RegEx:", - "\/the+\/gi", + "Regular expressions are way to find certain words or patterns inside of strings.", + "For example, if we wanted to find the number of times the word the occurred in the string The dog chased the cat, we could use the following regular expression: \/the+\/gi", "Let's break this down a bit:", "the is the pattern we want to match.", - "+ means we are looking for one or more occurrences of this pattern.", - "g means that it searches the entire string.", - "i means that we are ignoring the case (uppercase or lowercase) of what we are looking for.", - "Let's try finding the word and in the string John and Alan went to the shop and got some milk by replacing the .+ in the current RegEx with something that will find the word and and count how many times it occurs." + "+ means we want to find one or more occurrences of this pattern.", + "g means that we want to search the entire string for this pattern.", + "i means that we want to ignoring the case (uppercase or lowercase) when searching for the pattern.", + "Let's try counting the number of times the word and occurs in the string John and Alan went to the shop and got some milk. We can do this by replacing the .+ part of our regular expression with the current regular expression with the word and." ], "tests":[ - "assert(test==2, 'Your regular expression should have found two occurrences of the word and');", + "assert(test==2, 'Your regular expression should find two occurrences of the word and');", "assert(editor.getValue().match(/\\/and\\+\\/gi/), 'You should have used regular expressions to find the word and');" ], "challengeSeed":[ "var test = (function() {", " var testString = \"John and Alan went to the shop and got some milk\";", - "", + " var expressionToGetMilk = /milk/gi;", " // Only change code below this line.", "", " var expression = /.+/gi;", @@ -1028,10 +1026,9 @@ "title": "Find Numbers with Regular Expressions", "difficulty":"9.985", "description":[ - "We can use special selectors in RegEx to select a particular type of value.", + "We can use special selectors in Regular Expressions to select a particular type of value.", "One such selector is the digit selector \\d which is used to grab the numbers in a string.", - "It is used like this:", - "/\\d+/g" + "It is used like this: /\\d+/g" ], "tests":[ "assert(test === 2, 'Your RegEx should have found two numbers in the testString');", diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json index 36744e2f9c9..466c49353ad 100644 --- a/seed/challenges/html5-and-css.json +++ b/seed/challenges/html5-and-css.json @@ -438,7 +438,7 @@ "tests": [ "assert($(\"h2\").css(\"color\") === \"rgb(255, 0, 0)\", 'Your h2 element should be red.')", "assert($(\"h2\").hasClass(\"red-text\"), 'Your h2 element should have the class red-text.')", - "assert($(\"h2\").attr(\"style\") === undefined, 'Don't use inline style declarations like style=\"color: red\" in your h2 element.')" + "assert($(\"h2\").attr(\"style\") === undefined, 'Do not use inline style declarations like style=\"color: red\" in your h2 element.')" ], "challengeSeed": [ "